mirror of
https://github.com/hcengineering/platform.git
synced 2025-03-26 09:47:28 +00:00
Fix maintenance period warning
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
parent
d86a6f5bcd
commit
e7b31803a0
@ -1,5 +1,5 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import core, { RateLimiter } from '@hcengineering/core'
|
import core, { RateLimiter, concatLink } from '@hcengineering/core'
|
||||||
import login from '@hcengineering/login'
|
import login from '@hcengineering/login'
|
||||||
import { getEmbeddedLabel, getMetadata } from '@hcengineering/platform'
|
import { getEmbeddedLabel, getMetadata } from '@hcengineering/platform'
|
||||||
import presentation, { getClient, isAdminUser } from '@hcengineering/presentation'
|
import presentation, { getClient, isAdminUser } from '@hcengineering/presentation'
|
||||||
@ -109,9 +109,12 @@
|
|||||||
on:click={() => {
|
on:click={() => {
|
||||||
const endpoint = getMetadata(login.metadata.AccountsUrl) ?? ''
|
const endpoint = getMetadata(login.metadata.AccountsUrl) ?? ''
|
||||||
if (endpoint !== '') {
|
if (endpoint !== '') {
|
||||||
void fetch(endpoint + `/api/v1/manage?token=${token}&operation=maintenance&timeout=${warningTimeout}`, {
|
void fetch(
|
||||||
method: 'PUT'
|
concatLink(endpoint, `/api/v1/manage?token=${token}&operation=maintenance&timeout=${warningTimeout}`),
|
||||||
})
|
{
|
||||||
|
method: 'PUT'
|
||||||
|
}
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
@ -126,7 +129,7 @@
|
|||||||
on:click={() => {
|
on:click={() => {
|
||||||
const endpoint = getMetadata(login.metadata.AccountsUrl) ?? ''
|
const endpoint = getMetadata(login.metadata.AccountsUrl) ?? ''
|
||||||
if (endpoint !== '') {
|
if (endpoint !== '') {
|
||||||
void fetch(endpoint + `/api/v1/manage?token=${token}&operation=maintenance&timeout=-1`, {
|
void fetch(concatLink(endpoint, `/api/v1/manage?token=${token}&operation=maintenance&timeout=-1`), {
|
||||||
method: 'PUT'
|
method: 'PUT'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user