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
+1 -1
View File
@@ -98,7 +98,7 @@ async function registerUser(email, password) {
}
async function getWebToken() {
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 token = await settings.set(settings.APPSTORE_WEB_TOKEN_KEY);
if (!token) throw new BoxError(BoxError.NOT_FOUND); // user will have to re-login with password somehow