migrate admin settings
This commit is contained in:
@@ -5,6 +5,7 @@ import { generateUrl } from '@nextcloud/router'
|
||||
|
||||
export const useConfigStore = defineStore('config', () => {
|
||||
const config = ref(null)
|
||||
const appConfig = ref(null)
|
||||
|
||||
async function getConfig() {
|
||||
if (config.value !== null) {
|
||||
@@ -16,7 +17,18 @@ export const useConfigStore = defineStore('config', () => {
|
||||
return config.value
|
||||
}
|
||||
|
||||
async function getAppConfig() {
|
||||
if (appConfig.value !== null) {
|
||||
return appConfig.value
|
||||
}
|
||||
|
||||
appConfig.value = await axios.get(generateUrl('/apps/side_menu/admin/config')).then((response) => response.data)
|
||||
|
||||
return appConfig.value
|
||||
}
|
||||
|
||||
return {
|
||||
getConfig,
|
||||
getAppConfig,
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user