support for backend jobs and other script API changes

This commit is contained in:
azivner
2018-02-24 14:42:52 -05:00
parent 5dd93e4cdc
commit a555b6319c
8 changed files with 106 additions and 11 deletions

View File

@@ -17,6 +17,12 @@ router.post('/exec', auth.checkApiAuth, wrap(async (req, res, next) => {
});
}));
router.post('/job', auth.checkApiAuth, wrap(async (req, res, next) => {
await script.setJob(req.body);
res.send({});
}));
router.get('/startup', auth.checkApiAuth, wrap(async (req, res, next) => {
const noteIds = await attributes.getNoteIdsWithAttribute("run_on_startup");
const repository = new Repository(req);