fixes for DB initalization and import of demo data

This commit is contained in:
azivner
2017-12-23 13:55:13 -05:00
parent cf8334607e
commit 79a4a6eb01
8 changed files with 47 additions and 42 deletions

View File

@@ -42,7 +42,7 @@ router.post('/sync', async (req, res, next) => {
req.session.loggedIn = true;
res.send({
sourceId: await source_id.getCurrentSourceId()
sourceId: source_id.getCurrentSourceId()
});
});

View File

@@ -24,10 +24,7 @@ router.post('/now', auth.checkApiAuth, async (req, res, next) => {
router.post('/fill-sync-rows', auth.checkApiAuth, async (req, res, next) => {
await sql.doInTransaction(async () => {
await sync_table.fillSyncRows("notes", "note_id");
await sync_table.fillSyncRows("notes_tree", "note_tree_id");
await sync_table.fillSyncRows("notes_history", "note_history_id");
await sync_table.fillSyncRows("recent_notes", "note_tree_id");
await sync_table.fillAllSyncRows();
});
log.info("Sync rows have been filled.");