mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
fix: use single bulkTagAssets call instead of loop (#18672)
This commit is contained in:
parent
93e53f6d74
commit
369d3dfa38
1 changed files with 2 additions and 4 deletions
|
|
@ -21,6 +21,7 @@ import { navigate } from '$lib/utils/navigation';
|
|||
import {
|
||||
addAssetsToAlbum as addAssets,
|
||||
AssetVisibility,
|
||||
bulkTagAssets,
|
||||
createStack,
|
||||
deleteAssets,
|
||||
deleteStacks,
|
||||
|
|
@ -28,7 +29,6 @@ import {
|
|||
getBaseUrl,
|
||||
getDownloadInfo,
|
||||
getStack,
|
||||
tagAssets as tagAllAssets,
|
||||
untagAssets,
|
||||
updateAsset,
|
||||
updateAssets,
|
||||
|
|
@ -83,9 +83,7 @@ export const tagAssets = async ({
|
|||
tagIds: string[];
|
||||
showNotification?: boolean;
|
||||
}) => {
|
||||
for (const tagId of tagIds) {
|
||||
await tagAllAssets({ id: tagId, bulkIdsDto: { ids: assetIds } });
|
||||
}
|
||||
await bulkTagAssets({ tagBulkAssetsDto: { tagIds, assetIds } });
|
||||
|
||||
if (showNotification) {
|
||||
const $t = await getFormatter();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue