mirror of
https://github.com/immich-app/immich.git
synced 2025-12-20 09:15:35 +03:00
refactor(web): use new open api client (#7097)
* refactor(web): use new open api client * refactor: remove activity api * refactor: trash, oauth, and partner apis * refactor: job api * refactor: face, library, system config * refactor: user api * refactor: album api
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { api, type ServerConfigDto, type ServerFeaturesDto } from '@api';
|
||||
import { type ServerConfigDto, type ServerFeaturesDto } from '@api';
|
||||
import { getServerConfig, getServerFeatures } from '@immich/sdk';
|
||||
import { writable } from 'svelte/store';
|
||||
|
||||
export type FeatureFlags = ServerFeaturesDto & { loaded: boolean };
|
||||
@@ -31,10 +32,7 @@ export const serverConfig = writable<ServerConfig>({
|
||||
});
|
||||
|
||||
export const loadConfig = async () => {
|
||||
const [{ data: flags }, { data: config }] = await Promise.all([
|
||||
api.serverInfoApi.getServerFeatures(),
|
||||
api.serverInfoApi.getServerConfig(),
|
||||
]);
|
||||
const [flags, config] = await Promise.all([getServerFeatures(), getServerConfig()]);
|
||||
|
||||
featureFlags.update(() => ({ ...flags, loaded: true }));
|
||||
serverConfig.update(() => ({ ...config, loaded: true }));
|
||||
|
||||
Reference in New Issue
Block a user