mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
refactor(web) open api client (#7103)
* refactor: person api * refactor: shared link and others
This commit is contained in:
parent
5fc1d43012
commit
d8631a00bb
81 changed files with 638 additions and 656 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { notificationController, NotificationType } from '$lib/components/shared-components/notification/notification';
|
||||
import { api } from '@api';
|
||||
import { deleteAssets as deleteBulk } from '@immich/sdk';
|
||||
import { handleError } from './handle-error';
|
||||
|
||||
export type OnDelete = (assetId: string) => void;
|
||||
|
|
@ -10,7 +10,7 @@ export type OnStack = (ids: string[]) => void;
|
|||
|
||||
export const deleteAssets = async (force: boolean, onAssetDelete: OnDelete, ids: string[]) => {
|
||||
try {
|
||||
await api.assetApi.deleteAssets({ assetBulkDeleteDto: { ids, force } });
|
||||
await deleteBulk({ assetBulkDeleteDto: { ids, force } });
|
||||
for (const id of ids) {
|
||||
onAssetDelete(id);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue