1
0
mirror of https://github.com/immich-app/immich.git synced 2025-07-03 05:46:58 +02:00

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
19 changed files with 265 additions and 99 deletions

View File

@ -732,7 +732,7 @@ export type SmartSearchDto = {
withDeleted?: boolean;
withExif?: boolean;
};
export type ServerInfoResponseDto = {
export type ServerStorageResponseDto = {
diskAvailable: string;
diskAvailableRaw: number;
diskSize: string;
@ -2245,10 +2245,13 @@ export function getSearchSuggestions({ country, make, model, state, $type }: {
...opts
}));
}
/**
* This property was deprecated in v1.106.0
*/
export function getServerInfo(opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: ServerInfoResponseDto;
data: ServerStorageResponseDto;
}>("/server-info", {
...opts
}));
@ -2293,6 +2296,14 @@ export function getServerStatistics(opts?: Oazapfts.RequestOpts) {
...opts
}));
}
export function getStorage(opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: ServerStorageResponseDto;
}>("/server-info/storage", {
...opts
}));
}
export function getTheme(opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;