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 { import {
addAssetsToAlbum as addAssets, addAssetsToAlbum as addAssets,
AssetVisibility, AssetVisibility,
bulkTagAssets,
createStack, createStack,
deleteAssets, deleteAssets,
deleteStacks, deleteStacks,
@ -28,7 +29,6 @@ import {
getBaseUrl, getBaseUrl,
getDownloadInfo, getDownloadInfo,
getStack, getStack,
tagAssets as tagAllAssets,
untagAssets, untagAssets,
updateAsset, updateAsset,
updateAssets, updateAssets,
@ -83,9 +83,7 @@ export const tagAssets = async ({
tagIds: string[]; tagIds: string[];
showNotification?: boolean; showNotification?: boolean;
}) => { }) => {
for (const tagId of tagIds) { await bulkTagAssets({ tagBulkAssetsDto: { tagIds, assetIds } });
await tagAllAssets({ id: tagId, bulkIdsDto: { ids: assetIds } });
}
if (showNotification) { if (showNotification) {
const $t = await getFormatter(); const $t = await getFormatter();