From 4ecd20d225f0588b336ac3c1d7c06c3c5cbee585 Mon Sep 17 00:00:00 2001 From: Saqib Ansari Date: Wed, 29 Nov 2023 12:56:58 +0530 Subject: [PATCH] fix: remove unused system settings code --- frontend/src/stores/settingsStore.ts | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/frontend/src/stores/settingsStore.ts b/frontend/src/stores/settingsStore.ts index d1a896f85..5d4dc4896 100644 --- a/frontend/src/stores/settingsStore.ts +++ b/frontend/src/stores/settingsStore.ts @@ -16,24 +16,15 @@ type InsightsSettings = { const settingsStore = defineStore('insights:settings', () => { const insightsSettings = api.getDocumentResource('Insights Settings') - const systemSettings = api.getDocumentResource('System Settings') - - const initialized = computed(() => insightsSettings.doc?.name && systemSettings.doc?.name) + const initialized = computed(() => insightsSettings.doc?.name) async function initialize() { if (initialized.value) return await insightsSettings.get.fetch() - await systemSettings.get.fetch() } - const loading = computed(() => insightsSettings.loading || systemSettings.loading) - + const loading = computed(() => insightsSettings.loading) const settings = computed({ - get() { - return { - ...(insightsSettings.doc || {}), - ...(systemSettings.doc || {}), - } - }, + get: () => insightsSettings.doc, set(value: InsightsSettings) { insightsSettings.doc = value },