diff --git a/plugins/workbench-resources/src/components/ServerManagerGeneral.svelte b/plugins/workbench-resources/src/components/ServerManagerGeneral.svelte index a0ca57db40..9ab69f43f2 100644 --- a/plugins/workbench-resources/src/components/ServerManagerGeneral.svelte +++ b/plugins/workbench-resources/src/components/ServerManagerGeneral.svelte @@ -3,7 +3,7 @@ import login from '@hcengineering/login' import { getEmbeddedLabel, getMetadata } from '@hcengineering/platform' import presentation, { getClient, isAdminUser } from '@hcengineering/presentation' - import { Button, IconArrowRight, fetchMetadataLocalStorage } from '@hcengineering/ui' + import { Button, IconArrowLeft, IconArrowRight, fetchMetadataLocalStorage } from '@hcengineering/ui' import EditBox from '@hcengineering/ui/src/components/EditBox.svelte' const _endpoint: string = fetchMetadataLocalStorage(login.metadata.LoginEndpoint) ?? '' @@ -107,9 +107,12 @@ icon={IconArrowRight} label={getEmbeddedLabel('Set maintenance warning')} on:click={() => { - void fetch(endpoint + `/api/v1/manage?token=${token}&operation=maintenance&timeout=${warningTimeout}`, { - method: 'PUT' - }) + const endpoint = getMetadata(login.metadata.AccountsUrl) ?? '' + if (endpoint !== '') { + void fetch(endpoint + `/api/v1/manage?token=${token}&operation=maintenance&timeout=${warningTimeout}`, { + method: 'PUT' + }) + } }} />
@@ -117,6 +120,18 @@ min
+