From f41e325273ff664ed7079a69938e27aef9716f7f Mon Sep 17 00:00:00 2001 From: Bobby Wibowo Date: Sun, 1 Nov 2020 16:38:36 +0700 Subject: [PATCH] fixed mods editing own albums also disable them --- controllers/albumsController.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/albumsController.js b/controllers/albumsController.js index 850730f..e365e81 100644 --- a/controllers/albumsController.js +++ b/controllers/albumsController.js @@ -323,7 +323,7 @@ self.edit = async (req, res, next) => { : '' } - if (ismoderator) { + if (ismoderator && typeof req.body.enabled !== 'undefined') { update.enabled = Boolean(req.body.enabled) }