refactor: deprecate /server-info and replace with /server-info/storage (#9645)

This commit is contained in:
Zack Pollard 2024-05-22 10:25:55 +01:00 committed by GitHub
parent a341ab0050
commit a3e7e8cc31
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 265 additions and 99 deletions

View file

@ -1,7 +1,7 @@
import { browser } from '$app/environment';
import { serverInfo } from '$lib/stores/server-info.store';
import { user } from '$lib/stores/user.store';
import { getMyUserInfo, getServerInfo } from '@immich/sdk';
import { getMyUserInfo, getStorage } from '@immich/sdk';
import { redirect } from '@sveltejs/kit';
import { get } from 'svelte/store';
import { AppRoute } from '../constants';
@ -58,7 +58,7 @@ export const authenticate = async (options?: AuthOptions) => {
export const requestServerInfo = async () => {
if (get(user)) {
const data = await getServerInfo();
const data = await getStorage();
serverInfo.set(data);
}
};