should fix admin e2e test
This commit is contained in:
parent
0b27da21ac
commit
ab34412a2e
4 changed files with 17 additions and 15 deletions
|
|
@ -87,22 +87,19 @@ export const useAdminSettingsStore = defineStore('adminSettings', {
|
|||
loadAdminStuff() {
|
||||
getInstanceDBConfig({
|
||||
credentials: useOAuthStore().token,
|
||||
}).then(({ data: backendDbConfig }) => {
|
||||
if (backendDbConfig.error) {
|
||||
if (backendDbConfig.error.status === 400) {
|
||||
backendDbConfig.error.json().then((errorJson) => {
|
||||
if (/configurable_from_database/.test(errorJson.error)) {
|
||||
this.setInstanceAdminNoDbConfig()
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
})
|
||||
.then(({ data: backendDbConfig }) =>
|
||||
this.setInstanceAdminSettings({
|
||||
credentials: useOAuthStore().token,
|
||||
backendDbConfig,
|
||||
})
|
||||
}
|
||||
})
|
||||
}))
|
||||
.catch(({ statusCode, statusText }) => {
|
||||
if (statusCode === 400) {
|
||||
if (/configurable_from_database/.test(statusText)) {
|
||||
this.setInstanceAdminNoDbConfig()
|
||||
}
|
||||
}
|
||||
})
|
||||
if (this.descriptions === null) {
|
||||
getInstanceConfigDescriptions({
|
||||
credentials: useOAuthStore().token,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue