mirror of
https://github.com/immich-app/immich
synced 2026-08-29 13:15:45 +00:00
refactor: use respondWithCookie
refactor: merge start/end into one route refactor: rename MaintenanceRepository to AppRepository chore: use new ApiTag/Endpoint refactor: apply other requested changes
This commit is contained in:
parent
15c0d5f27a
commit
1fc98990ab
22 changed files with 1041 additions and 10008 deletions
|
|
@ -1,6 +1,6 @@
|
|||
<script lang="ts">
|
||||
import { handleError } from '$lib/utils/handle-error';
|
||||
import { startMaintenance } from '@immich/sdk';
|
||||
import { setMaintenanceMode } from '@immich/sdk';
|
||||
import { Button } from '@immich/ui';
|
||||
import { t } from 'svelte-i18n';
|
||||
import { fade } from 'svelte/transition';
|
||||
|
|
@ -13,7 +13,11 @@
|
|||
|
||||
async function start() {
|
||||
try {
|
||||
await startMaintenance();
|
||||
await setMaintenanceMode({
|
||||
setMaintenanceModeDto: {
|
||||
maintenanceMode: true,
|
||||
},
|
||||
});
|
||||
} catch (error) {
|
||||
handleError(error, $t('admin.maintenance_start_error'));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
import FormatMessage from '$lib/elements/FormatMessage.svelte';
|
||||
import { maintenanceAuth } from '$lib/stores/maintenance.store';
|
||||
import { handleError } from '$lib/utils/handle-error';
|
||||
import { endMaintenance } from '@immich/sdk';
|
||||
import { setMaintenanceMode } from '@immich/sdk';
|
||||
import { Button, Heading, Link } from '@immich/ui';
|
||||
import { t } from 'svelte-i18n';
|
||||
|
||||
|
|
@ -16,7 +16,11 @@
|
|||
|
||||
async function end() {
|
||||
try {
|
||||
await endMaintenance();
|
||||
await setMaintenanceMode({
|
||||
setMaintenanceModeDto: {
|
||||
maintenanceMode: false,
|
||||
},
|
||||
});
|
||||
} catch (error) {
|
||||
handleError(error, $t('maintenance_end_error'));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue