fix assetCount getting reset when adding users

This commit is contained in:
mgabor
2024-04-12 17:28:00 +02:00
parent 3211894e18
commit ffc4697d4a

View File

@@ -215,7 +215,7 @@ export class AlbumService {
async addUsers(auth: AuthDto, id: string, dto: AddUsersDto): Promise<AlbumResponseDto> {
await this.access.requirePermission(auth, Permission.ALBUM_SHARE, id);
const album = await this.findOrFail(id, { withAssets: false });
const album = await this.findOrFail(id, { withAssets: true });
for (const userId of dto.sharedUserIds) {
if (album.ownerId === userId) {