dashboard: show app checklist
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user