mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
fix: empty and restore over 1,000 items (#12751)
This commit is contained in:
parent
4f25cec6df
commit
6740c67ed8
39 changed files with 540 additions and 145 deletions
|
|
@ -1246,6 +1246,9 @@ export type TimeBucketResponseDto = {
|
|||
count: number;
|
||||
timeBucket: string;
|
||||
};
|
||||
export type TrashResponseDto = {
|
||||
count: number;
|
||||
};
|
||||
export type UserUpdateMeDto = {
|
||||
email?: string;
|
||||
name?: string;
|
||||
|
|
@ -3073,13 +3076,19 @@ export function getTimeBuckets({ albumId, isArchived, isFavorite, isTrashed, key
|
|||
}));
|
||||
}
|
||||
export function emptyTrash(opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchText("/trash/empty", {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
status: 200;
|
||||
data: TrashResponseDto;
|
||||
}>("/trash/empty", {
|
||||
...opts,
|
||||
method: "POST"
|
||||
}));
|
||||
}
|
||||
export function restoreTrash(opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchText("/trash/restore", {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
status: 200;
|
||||
data: TrashResponseDto;
|
||||
}>("/trash/restore", {
|
||||
...opts,
|
||||
method: "POST"
|
||||
}));
|
||||
|
|
@ -3087,7 +3096,10 @@ export function restoreTrash(opts?: Oazapfts.RequestOpts) {
|
|||
export function restoreAssets({ bulkIdsDto }: {
|
||||
bulkIdsDto: BulkIdsDto;
|
||||
}, opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchText("/trash/restore/assets", oazapfts.json({
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
status: 200;
|
||||
data: TrashResponseDto;
|
||||
}>("/trash/restore/assets", oazapfts.json({
|
||||
...opts,
|
||||
method: "POST",
|
||||
body: bulkIdsDto
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue