mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-31 03:40:16 +01:00
fix: tests
This commit is contained in:
@@ -93,12 +93,12 @@ Themes.set = async (data) => {
|
|||||||
'theme:templates': '',
|
'theme:templates': '',
|
||||||
'theme:src': '',
|
'theme:src': '',
|
||||||
};
|
};
|
||||||
const current = await Meta.configs.get('theme:id');
|
|
||||||
let config = await fsReadfile(path.join(nconf.get('themes_path'), data.id, 'theme.json'), 'utf8');
|
|
||||||
config = JSON.parse(config);
|
|
||||||
|
|
||||||
switch (data.type) {
|
switch (data.type) {
|
||||||
case 'local':
|
case 'local': {
|
||||||
|
const current = await Meta.configs.get('theme:id');
|
||||||
|
var config = await fsReadfile(path.join(nconf.get('themes_path'), data.id, 'theme.json'), 'utf8');
|
||||||
|
config = JSON.parse(config);
|
||||||
await db.sortedSetRemove('plugins:active', current);
|
await db.sortedSetRemove('plugins:active', current);
|
||||||
await db.sortedSetAdd('plugins:active', 0, data.id);
|
await db.sortedSetAdd('plugins:active', 0, data.id);
|
||||||
|
|
||||||
@@ -120,6 +120,7 @@ Themes.set = async (data) => {
|
|||||||
|
|
||||||
Meta.reloadRequired = true;
|
Meta.reloadRequired = true;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case 'bootswatch':
|
case 'bootswatch':
|
||||||
await Meta.configs.setMultiple({
|
await Meta.configs.setMultiple({
|
||||||
'theme:src': data.src,
|
'theme:src': data.src,
|
||||||
|
|||||||
Reference in New Issue
Block a user