dashboard: show app checklist

This commit is contained in:
Johannes Zellner
2024-04-19 12:40:35 +02:00
parent 16521d5434
commit 49243822af
6 changed files with 49 additions and 8 deletions
+13
View File
@@ -24,6 +24,7 @@ exports = module.exports = {
setLabel,
setTags,
setNotes,
setChecklist,
setIcon,
setTurn,
setRedis,
@@ -270,6 +271,18 @@ async function setNotes(req, res, next) {
next(new HttpSuccess(200, {}));
}
async function setChecklist(req, res, next) {
assert.strictEqual(typeof req.body, 'object');
assert.strictEqual(typeof req.app, 'object');
if (typeof req.body.checklist !== 'object') return next(new HttpError(400, 'checklist must be an object'));
const [error] = await safe(apps.setChecklist(req.app, req.body.checklist, AuditSource.fromRequest(req)));
if (error) return next(BoxError.toHttpError(error));
next(new HttpSuccess(200, {}));
}
async function setIcon(req, res, next) {
assert.strictEqual(typeof req.body, 'object');
assert.strictEqual(typeof req.app, 'object');