demo is just a constant, not a setting

This commit is contained in:
Girish Ramakrishnan
2023-08-04 14:13:30 +05:30
parent d79d24efad
commit 6aad89ae6e
10 changed files with 21 additions and 24 deletions

View File

@@ -71,7 +71,7 @@ async function getConfig() {
async function setConfig(newConfig) {
assert.strictEqual(typeof newConfig, 'object');
if (settings.isDemo()) throw new BoxError(BoxError.BAD_FIELD, 'Not allowed in demo mode');
if (constants.DEMO) throw new BoxError(BoxError.BAD_FIELD, 'Not allowed in demo mode');
const currentConfig = await getConfig();