0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-03-11 02:23:09 -05:00

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

* fix(mobile): add user to album using new DTO property

* fix(mobile): add user to album using new DTO property
This commit is contained in:
Alex 2024-05-07 15:00:38 -05:00 committed by GitHub
parent 78b5990d2a
commit ee6995783f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 2 deletions

View file

@ -279,9 +279,13 @@ class AlbumService {
Album album, Album album,
) async { ) async {
try { try {
final List<AlbumUserAddDto> albumUsers = sharedUserIds
.map((userId) => AlbumUserAddDto(userId: userId))
.toList();
final result = await _apiService.albumApi.addUsersToAlbum( final result = await _apiService.albumApi.addUsersToAlbum(
album.remoteId!, album.remoteId!,
AddUsersDto(sharedUserIds: sharedUserIds), AddUsersDto(albumUsers: albumUsers),
); );
if (result != null) { if (result != null) {
album.sharedUsers album.sharedUsers

View file

@ -25,7 +25,6 @@ export class AlbumUserAddDto {
export class AddUsersDto { export class AddUsersDto {
@ValidateUUID({ each: true, optional: true }) @ValidateUUID({ each: true, optional: true })
@ArrayNotEmpty()
@PropertyLifecycle({ deprecatedAt: 'v1.102.0' }) @PropertyLifecycle({ deprecatedAt: 'v1.102.0' })
sharedUserIds?: string[]; sharedUserIds?: string[];