Skip to content

High performance self-hosted photo and video management solution.

fix(mobile): add user to album using new dto property (#9312)

Alexee6995783fca
diff --git a/mobile/lib/services/album.service.dart b/mobile/lib/services/album.service.dart
index 45c6076fbd..bdf38a42af 100644
--- a/mobile/lib/services/album.service.dart
+++ b/mobile/lib/services/album.service.dart
@@ -279,9 +279,13 @@ class AlbumService {
Album album,
) async {
try {
+ final List<AlbumUserAddDto> albumUsers = sharedUserIds
+ .map((userId) => AlbumUserAddDto(userId: userId))
+ .toList();
+
final result = await _apiService.albumApi.addUsersToAlbum(
album.remoteId!,
- AddUsersDto(sharedUserIds: sharedUserIds),
+ AddUsersDto(albumUsers: albumUsers),
);
if (result != null) {
album.sharedUsers
diff --git a/server/src/dtos/album.dto.ts b/server/src/dtos/album.dto.ts
index f6a954dcdd..fb4aff9485 100644
--- a/server/src/dtos/album.dto.ts
+++ b/server/src/dtos/album.dto.ts
@@ -25,7 +25,6 @@ export class AlbumUserAddDto {
export class AddUsersDto {
@ValidateUUID({ each: true, optional: true })
- @ArrayNotEmpty()
@PropertyLifecycle({ deprecatedAt: 'v1.102.0' })
sharedUserIds?: string[];