mirror of
https://github.com/zadam/trilium.git
synced 2025-12-22 16:20:08 +01:00
added basic infrastructure for attributes
This commit is contained in:
@@ -140,6 +140,12 @@ router.get('/notes_image/:noteImageId', auth.checkApiAuth, wrap(async (req, res,
|
||||
res.send(await sql.getFirst("SELECT * FROM notes_image WHERE note_image_id = ?", [noteImageId]));
|
||||
}));
|
||||
|
||||
router.get('/attributes/:attributeId', auth.checkApiAuth, wrap(async (req, res, next) => {
|
||||
const attributeId = req.params.attributeId;
|
||||
|
||||
res.send(await sql.getFirst("SELECT * FROM attributes WHERE attribute_id = ?", [attributeId]));
|
||||
}));
|
||||
|
||||
router.put('/notes', auth.checkApiAuth, wrap(async (req, res, next) => {
|
||||
await syncUpdate.updateNote(req.body.entity, req.body.sourceId);
|
||||
|
||||
@@ -188,4 +194,10 @@ router.put('/notes_image', auth.checkApiAuth, wrap(async (req, res, next) => {
|
||||
res.send({});
|
||||
}));
|
||||
|
||||
router.put('/attributes', auth.checkApiAuth, wrap(async (req, res, next) => {
|
||||
await syncUpdate.updateNoteImage(req.body.entity, req.body.sourceId);
|
||||
|
||||
res.send({});
|
||||
}));
|
||||
|
||||
module.exports = router;
|
||||
Reference in New Issue
Block a user