renaming of sql methods to fit getRows/getEntities model

This commit is contained in:
azivner
2018-01-29 17:41:59 -05:00
parent 9b53a17168
commit b44412bc32
32 changed files with 134 additions and 123 deletions

View File

@@ -11,7 +11,7 @@ const wrap = require('express-promise-wrap').wrap;
router.get('/:noteId/attributes', auth.checkApiAuth, wrap(async (req, res, next) => {
const noteId = req.params.noteId;
res.send(await sql.getAll("SELECT * FROM attributes WHERE noteId = ? ORDER BY dateCreated", [noteId]));
res.send(await sql.getRows("SELECT * FROM attributes WHERE noteId = ? ORDER BY dateCreated", [noteId]));
}));
router.put('/:noteId/attributes', auth.checkApiAuth, wrap(async (req, res, next) => {
@@ -42,7 +42,7 @@ router.put('/:noteId/attributes', auth.checkApiAuth, wrap(async (req, res, next)
}
});
res.send(await sql.getAll("SELECT * FROM attributes WHERE noteId = ? ORDER BY dateCreated", [noteId]));
res.send(await sql.getRows("SELECT * FROM attributes WHERE noteId = ? ORDER BY dateCreated", [noteId]));
}));
module.exports = router;