mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 19:36:12 +01:00
added support for trilium-sender
This commit is contained in:
@@ -147,6 +147,12 @@ router.get('/attributes/:attributeId', auth.checkApiAuth, wrap(async (req, res,
|
||||
res.send(await sql.getRow("SELECT * FROM attributes WHERE attributeId = ?", [attributeId]));
|
||||
}));
|
||||
|
||||
router.get('/api_tokens/:apiTokenId', auth.checkApiAuth, wrap(async (req, res, next) => {
|
||||
const apiTokenId = req.params.apiTokenId;
|
||||
|
||||
res.send(await sql.getRow("SELECT * FROM api_tokens WHERE apiTokenId = ?", [apiTokenId]));
|
||||
}));
|
||||
|
||||
router.put('/notes', auth.checkApiAuth, wrap(async (req, res, next) => {
|
||||
await syncUpdate.updateNote(req.body.entity, req.body.sourceId);
|
||||
|
||||
@@ -201,4 +207,10 @@ router.put('/attributes', auth.checkApiAuth, wrap(async (req, res, next) => {
|
||||
res.send({});
|
||||
}));
|
||||
|
||||
router.put('/api_tokens', auth.checkApiAuth, wrap(async (req, res, next) => {
|
||||
await syncUpdate.updateApiToken(req.body.entity, req.body.sourceId);
|
||||
|
||||
res.send({});
|
||||
}));
|
||||
|
||||
module.exports = router;
|
||||
Reference in New Issue
Block a user