mirror of
https://github.com/immich-app/immich
synced 2026-08-22 13:13:05 +00:00
add set permission endpoint and UI
This commit is contained in:
parent
98f1d1517a
commit
ac1c4e206e
18 changed files with 419 additions and 6 deletions
|
|
@ -193,6 +193,9 @@ export type BulkIdResponseDto = {
|
|||
id: string;
|
||||
success: boolean;
|
||||
};
|
||||
export type SetAlbumPermissionDto = {
|
||||
"readonly": boolean;
|
||||
};
|
||||
export type AddUsersDto = {
|
||||
sharedUserIds: string[];
|
||||
};
|
||||
|
|
@ -1193,6 +1196,17 @@ export function addAssetsToAlbum({ id, key, bulkIdsDto }: {
|
|||
body: bulkIdsDto
|
||||
})));
|
||||
}
|
||||
export function setAlbumPermission({ id, userId, setAlbumPermissionDto }: {
|
||||
id: string;
|
||||
userId: string;
|
||||
setAlbumPermissionDto: SetAlbumPermissionDto;
|
||||
}, opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchText(`/album/${encodeURIComponent(id)}/permission/${encodeURIComponent(userId)}`, oazapfts.json({
|
||||
...opts,
|
||||
method: "PUT",
|
||||
body: setAlbumPermissionDto
|
||||
})));
|
||||
}
|
||||
export function removeUserFromAlbum({ id, userId }: {
|
||||
id: string;
|
||||
userId: string;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue