settings: move service setting into services.js

this also introduces getJson/setJson
This commit is contained in:
Girish Ramakrishnan
2023-08-03 11:34:33 +05:30
parent 3caf0c3902
commit bbc6ba1a35
10 changed files with 42 additions and 45 deletions

View File

@@ -55,8 +55,8 @@ async function enableRemoteSupport(enable, auditSource) {
}
async function getConfig() {
const value = await settings.get(settings.SUPPORT_CONFIG_KEY);
return value ? JSON.parse(value) : {
const value = await settings.getJson(settings.SUPPORT_CONFIG_KEY);
return value || {
email: 'support@cloudron.io',
remoteSupport: true,
ticketFormBody: