refactor(server): /user profile endpoint (#9669)
* refactor(server): user profile endpoint * chore: open api
This commit is contained in:
@@ -6327,49 +6327,6 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/users/profile-image/{id}": {
|
||||
"get": {
|
||||
"operationId": "getProfileImage",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"required": true,
|
||||
"in": "path",
|
||||
"schema": {
|
||||
"format": "uuid",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/octet-stream": {
|
||||
"schema": {
|
||||
"format": "binary",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
},
|
||||
{
|
||||
"cookie": []
|
||||
},
|
||||
{
|
||||
"api_key": []
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"User"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/users/{id}": {
|
||||
"delete": {
|
||||
"operationId": "deleteUser",
|
||||
@@ -6462,6 +6419,49 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/users/{id}/profile-image": {
|
||||
"get": {
|
||||
"operationId": "getProfileImage",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"required": true,
|
||||
"in": "path",
|
||||
"schema": {
|
||||
"format": "uuid",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/octet-stream": {
|
||||
"schema": {
|
||||
"format": "binary",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
},
|
||||
{
|
||||
"cookie": []
|
||||
},
|
||||
{
|
||||
"api_key": []
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"User"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/users/{id}/restore": {
|
||||
"post": {
|
||||
"operationId": "restoreUser",
|
||||
|
||||
@@ -2776,16 +2776,6 @@ export function createProfileImage({ createProfileImageDto }: {
|
||||
body: createProfileImageDto
|
||||
})));
|
||||
}
|
||||
export function getProfileImage({ id }: {
|
||||
id: string;
|
||||
}, opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchBlob<{
|
||||
status: 200;
|
||||
data: Blob;
|
||||
}>(`/users/profile-image/${encodeURIComponent(id)}`, {
|
||||
...opts
|
||||
}));
|
||||
}
|
||||
export function deleteUser({ id, deleteUserDto }: {
|
||||
id: string;
|
||||
deleteUserDto: DeleteUserDto;
|
||||
@@ -2809,6 +2799,16 @@ export function getUserById({ id }: {
|
||||
...opts
|
||||
}));
|
||||
}
|
||||
export function getProfileImage({ id }: {
|
||||
id: string;
|
||||
}, opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchBlob<{
|
||||
status: 200;
|
||||
data: Blob;
|
||||
}>(`/users/${encodeURIComponent(id)}/profile-image`, {
|
||||
...opts
|
||||
}));
|
||||
}
|
||||
export function restoreUser({ id }: {
|
||||
id: string;
|
||||
}, opts?: Oazapfts.RequestOpts) {
|
||||
|
||||
Reference in New Issue
Block a user