renaming attributes to labels, fixes #79

This commit is contained in:
azivner
2018-03-24 22:02:26 -04:00
parent 4c472ce78b
commit 95bb2cf0bb
40 changed files with 334 additions and 312 deletions

View File

@@ -144,10 +144,10 @@ router.get('/note_images/:noteImageId', auth.checkApiAuth, wrap(async (req, res,
res.send(await sql.getRow("SELECT * FROM note_images WHERE noteImageId = ?", [noteImageId]));
}));
router.get('/attributes/:attributeId', auth.checkApiAuth, wrap(async (req, res, next) => {
const attributeId = req.params.attributeId;
router.get('/labels/:labelId', auth.checkApiAuth, wrap(async (req, res, next) => {
const labelId = req.params.labelId;
res.send(await sql.getRow("SELECT * FROM attributes WHERE attributeId = ?", [attributeId]));
res.send(await sql.getRow("SELECT * FROM labels WHERE labelId = ?", [labelId]));
}));
router.get('/api_tokens/:apiTokenId', auth.checkApiAuth, wrap(async (req, res, next) => {
@@ -204,8 +204,8 @@ router.put('/note_images', auth.checkApiAuth, wrap(async (req, res, next) => {
res.send({});
}));
router.put('/attributes', auth.checkApiAuth, wrap(async (req, res, next) => {
await syncUpdate.updateAttribute(req.body.entity, req.body.sourceId);
router.put('/labels', auth.checkApiAuth, wrap(async (req, res, next) => {
await syncUpdate.updateLabel(req.body.entity, req.body.sourceId);
res.send({});
}));