mirror of
https://github.com/immich-app/immich.git
synced 2025-12-23 09:15:05 +03:00
refactor(server): user info endpoint (#9668)
* refactor(server): user info endpoint * chore: open api
This commit is contained in:
@@ -6229,48 +6229,6 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/users/info/{id}": {
|
||||
"get": {
|
||||
"operationId": "getUserById",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"required": true,
|
||||
"in": "path",
|
||||
"schema": {
|
||||
"format": "uuid",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/UserResponseDto"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
},
|
||||
{
|
||||
"cookie": []
|
||||
},
|
||||
{
|
||||
"api_key": []
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"User"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/users/me": {
|
||||
"get": {
|
||||
"operationId": "getMyUserInfo",
|
||||
@@ -6462,6 +6420,46 @@
|
||||
"tags": [
|
||||
"User"
|
||||
]
|
||||
},
|
||||
"get": {
|
||||
"operationId": "getUserById",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"required": true,
|
||||
"in": "path",
|
||||
"schema": {
|
||||
"format": "uuid",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/UserResponseDto"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
},
|
||||
{
|
||||
"cookie": []
|
||||
},
|
||||
{
|
||||
"api_key": []
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"User"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/users/{id}/restore": {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user