feat(frontend): added description handling the /profile
This commit is contained in:
parent
2ace5a9a94
commit
98f2af3f46
7 changed files with 57 additions and 9 deletions
|
|
@ -1767,7 +1767,8 @@
|
|||
"required": [
|
||||
"name",
|
||||
"id",
|
||||
"guest"
|
||||
"guest",
|
||||
"desc"
|
||||
],
|
||||
"properties": {
|
||||
"name": {
|
||||
|
|
@ -1779,6 +1780,9 @@
|
|||
"guest": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"desc": {
|
||||
"type": "string"
|
||||
},
|
||||
"selfInfo": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
|
|||
|
|
@ -529,7 +529,8 @@
|
|||
"required": [
|
||||
"name",
|
||||
"id",
|
||||
"guest"
|
||||
"guest",
|
||||
"desc"
|
||||
],
|
||||
"properties": {
|
||||
"name": {
|
||||
|
|
@ -541,6 +542,9 @@
|
|||
"guest": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"desc": {
|
||||
"type": "string"
|
||||
},
|
||||
"selfInfo": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import { isNullish, MakeStaticResponse, typeResponse } from '@shared/utils';
|
|||
|
||||
export const UserInfoRes = {
|
||||
'200': typeResponse('success', 'userinfo.success', {
|
||||
name: Type.String(), id: Type.String(), guest: Type.Boolean(),
|
||||
name: Type.String(), id: Type.String(), guest: Type.Boolean(), desc: Type.String(),
|
||||
selfInfo: Type.Optional(Type.Object({
|
||||
login_name: Type.Optional(Type.String()),
|
||||
provider_id: Type.Optional(Type.String()),
|
||||
|
|
@ -61,6 +61,7 @@ const route: FastifyPluginAsync = async (fastify, _opts): Promise<void> => {
|
|||
// ```
|
||||
// is the same as `val = !!something`
|
||||
guest: !!user.guest,
|
||||
desc: user.desc,
|
||||
selfInfo: askSelf ? {
|
||||
login_name: user.login,
|
||||
provider_id: user.provider_name,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue