mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
refactor(server): user info endpoint (#9668)
* refactor(server): user info endpoint * chore: open api
This commit is contained in:
parent
202745f14b
commit
ecd018a826
6 changed files with 64 additions and 66 deletions
|
|
@ -2750,16 +2750,6 @@ export function updateUser({ updateUserDto }: {
|
|||
body: updateUserDto
|
||||
})));
|
||||
}
|
||||
export function getUserById({ id }: {
|
||||
id: string;
|
||||
}, opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
status: 200;
|
||||
data: UserResponseDto;
|
||||
}>(`/users/info/${encodeURIComponent(id)}`, {
|
||||
...opts
|
||||
}));
|
||||
}
|
||||
export function getMyUserInfo(opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
status: 200;
|
||||
|
|
@ -2809,6 +2799,16 @@ export function deleteUser({ id, deleteUserDto }: {
|
|||
body: deleteUserDto
|
||||
})));
|
||||
}
|
||||
export function getUserById({ id }: {
|
||||
id: string;
|
||||
}, opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
status: 200;
|
||||
data: UserResponseDto;
|
||||
}>(`/users/${encodeURIComponent(id)}`, {
|
||||
...opts
|
||||
}));
|
||||
}
|
||||
export function restoreUser({ id }: {
|
||||
id: string;
|
||||
}, opts?: Oazapfts.RequestOpts) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue