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:
parent
78b5990d2a
commit
ee6995783f
2 changed files with 5 additions and 2 deletions
|
@ -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
|
||||||
|
|
|
@ -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[];
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue