From 4910e4f07ee233017b389e3eeb8314ee4a254b0e Mon Sep 17 00:00:00 2001 From: Pedro Beschorner Marin Date: Mon, 24 Oct 2022 17:43:44 -0300 Subject: [PATCH 1/2] refactor(database): move models to settings (#15) * refactor(database): move models to settings * fix(settings): remove commas * fix(settings): remove comma * fix(database): wrong assignment to models Co-authored-by: Arthur B. Grossi <32987232+Arthurk12@users.noreply.github.com> --- config/settings.json.template | 18 ++++++++++++++++++ lib/redis/database.js | 23 +++-------------------- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/config/settings.json.template b/config/settings.json.template index 8fc0aed..880b226 100644 --- a/config/settings.json.template +++ b/config/settings.json.template @@ -26,6 +26,24 @@ "log": { "level": "info" }, + "models": { + "notes": { + "id": "notes", + "permission": { + "MODERATOR": true, + "VIEWER": true + }, + "capacity": 0 + }, + "captions": { + "id": "captions", + "permission": { + "MODERATOR": true, + "VIEWER": false + }, + "capacity": 1 + } + }, "monitor": { "enabled": true, "interval": 3600000 diff --git a/lib/redis/database.js b/lib/redis/database.js index 6cb6fb6..5fa3952 100644 --- a/lib/redis/database.js +++ b/lib/redis/database.js @@ -13,26 +13,9 @@ const Logger = require('../utils/logger'); const logger = new Logger('database'); -const { etherpad: settings } = config; - -const MODELS = { - notes: { - id: 'notes', - permission: { - MODERATOR: true, - VIEWER: true, - }, - capacity: 0, - }, - captions: { - id: 'captions', - permission: { - MODERATOR: true, - VIEWER: false, - }, - capacity: 1, - }, -}; +const { etherpad: settings, models } = config; + +const MODELS = models; const database = {}; From 2772246b24a607d5dd76271b7056abce7d8f7487 Mon Sep 17 00:00:00 2001 From: prlanzarin <4529051+prlanzarin@users.noreply.github.com> Date: Tue, 25 Oct 2022 13:15:25 +0000 Subject: [PATCH 2/2] 1.3.1 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 40463aa..d61ecd4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "bbb-pads", - "version": "1.3.0", + "version": "1.3.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "bbb-pads", - "version": "1.3.0", + "version": "1.3.1", "license": "LGPL-3.0", "dependencies": { "@mconf/bbb-diff": "^1.2.0", diff --git a/package.json b/package.json index ce24acb..01242a9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bbb-pads", - "version": "1.3.0", + "version": "1.3.1", "description": "BigBlueButton's pads manager", "engines": { "node": ">=16"