mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
Implemented editable album title (#130)
* Replace static title text with a text edit field * Implement endpoint for updating album info * Implement changing title * Only the owner can change the title
This commit is contained in:
@@ -138,4 +138,23 @@ class SharedAlbumService {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Future<bool> changeTitleAlbum(String albumId, String ownerId, String newAlbumTitle) async {
|
||||
try {
|
||||
Response res = await _networkService.patchRequest(url: 'shared/updateInfo', data: {
|
||||
"albumId": albumId,
|
||||
"ownerId": ownerId,
|
||||
"albumName": newAlbumTitle,
|
||||
});
|
||||
|
||||
if (res.statusCode != 200) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
} catch (e) {
|
||||
debugPrint("Error deleteAlbum ${e.toString()}");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user