feat(frontend): added description handling the /profile

This commit is contained in:
Maieul BOYER 2025-12-22 19:38:02 +01:00
parent 2ace5a9a94
commit 98f2af3f46
No known key found for this signature in database
7 changed files with 57 additions and 9 deletions

View file

@ -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": {

View file

@ -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": {

View file

@ -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,