fix: use single bulkTagAssets call instead of loop (#18672)

This commit is contained in:
bo0tzz 2025-05-27 12:35:22 +02:00 committed by GitHub
parent 93e53f6d74
commit 369d3dfa38
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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();