change in naming of SQL methods

added assert methods to note tree
This commit is contained in:
azivner
2017-12-23 11:02:38 -05:00
parent c07c18f08a
commit bd2a5f6d82
27 changed files with 139 additions and 85 deletions

View File

@@ -9,7 +9,7 @@ const auth = require('../../services/auth');
router.post('/cleanup-soft-deleted-items', auth.checkApiAuth, async (req, res, next) => {
await sql.doInTransaction(async () => {
const noteIdsToDelete = await sql.getFlattenedResults("SELECT note_id FROM notes WHERE is_deleted = 1");
const noteIdsToDelete = await sql.getFirstColumn("SELECT note_id FROM notes WHERE is_deleted = 1");
const noteIdsSql = noteIdsToDelete
.map(noteId => "'" + utils.sanitizeSql(noteId) + "'")
.join(', ');