small changes to table names (notes_image => note_images etc.)

This commit is contained in:
azivner
2018-01-28 19:38:05 -05:00
parent 3b1f928fbc
commit 11e173aeac
29 changed files with 225 additions and 225 deletions

View File

@@ -10,7 +10,7 @@ const wrap = require('express-promise-wrap').wrap;
router.get('/:noteId', auth.checkApiAuth, wrap(async (req, res, next) => {
const noteId = req.params.noteId;
const history = await sql.getAll("SELECT * FROM notes_history WHERE noteId = ? order by dateModifiedTo desc", [noteId]);
const history = await sql.getAll("SELECT * FROM note_revisions WHERE noteId = ? order by dateModifiedTo desc", [noteId]);
protected_session.decryptNoteHistoryRows(req, history);
res.send(history);
@@ -20,9 +20,9 @@ router.put('', auth.checkApiAuth, wrap(async (req, res, next) => {
const sourceId = req.headers.sourceId;
await sql.doInTransaction(async () => {
await sql.replace("notes_history", req.body);
await sql.replace("note_revisions", req.body);
await sync_table.addNoteHistorySync(req.body.noteHistoryId, sourceId);
await sync_table.addNoteHistorySync(req.body.noteRevisionId, sourceId);
});
res.send();