migrate contentService

This commit is contained in:
Denys Vuika
2023-05-18 20:11:53 +01:00
parent b8ec2b88a4
commit f46008830e
3 changed files with 6 additions and 6 deletions

View File

@@ -15,7 +15,7 @@
},
"plugins": {
"aosPlugin": "${APP_CONFIG_PLUGIN_AOS}",
"contentService": ${APP_CONFIG_PLUGIN_CONTENT_SERVICE},
"contentService": "${APP_CONFIG_PLUGIN_CONTENT_SERVICE}",
"folderRules": ${APP_CONFIG_PLUGIN_FOLDER_RULES}
},
"oauth2": {

View File

@@ -42,7 +42,7 @@ describe('ContentServiceExtensionService', () => {
appConfig = TestBed.inject(AppConfigService);
appConfig.config = Object.assign(appConfig.config, {
plugins: {
contentService: true
contentService: 'true'
}
});

View File

@@ -36,10 +36,10 @@ export class ContentServiceExtensionService {
updateContentServiceAvailability() {
this.appConfigService.onLoad.pipe(take(1)).subscribe((config) => {
if (config.plugins && config.plugins.contentService === false) {
this.disableContentServices();
} else {
if (config?.plugins?.contentService === 'true') {
this.enableContentServices();
} else {
this.disableContentServices();
}
});
}
@@ -51,7 +51,7 @@ export class ContentServiceExtensionService {
}
private enableContentServices() {
if (localStorage && localStorage.getItem('contentService') === 'false') {
if (localStorage) {
localStorage.setItem('contentService', 'true');
}
}