feat(backend): Add Config Option For Bio Length
This commit is contained in:
parent
a4c0ef824c
commit
df77f339ec
12 changed files with 71 additions and 15 deletions
|
|
@ -433,7 +433,7 @@ export type MiPartialRemoteUser = Partial<MiUser> & {
|
|||
export const localUsernameSchema = { type: 'string', pattern: /^\w{1,20}$/.toString().slice(1, -1) } as const;
|
||||
export const passwordSchema = { type: 'string', minLength: 1 } as const;
|
||||
export const nameSchema = { type: 'string', minLength: 1, maxLength: 50 } as const;
|
||||
export const descriptionSchema = { type: 'string', minLength: 1, maxLength: 1500 } as const;
|
||||
export const descriptionSchema = { type: 'string', minLength: 1 } as const;
|
||||
export const followedMessageSchema = { type: 'string', minLength: 1, maxLength: 256 } as const;
|
||||
export const locationSchema = { type: 'string', minLength: 1, maxLength: 50 } as const;
|
||||
export const listenbrainzSchema = { type: 'string', minLength: 1, maxLength: 128 } as const;
|
||||
|
|
|
|||
|
|
@ -43,8 +43,8 @@ export class MiUserProfile {
|
|||
})
|
||||
public listenbrainz: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 2048, nullable: true,
|
||||
@Column('text', {
|
||||
nullable: true,
|
||||
comment: 'The description (bio) of the User.',
|
||||
})
|
||||
public description: string | null;
|
||||
|
|
|
|||
|
|
@ -206,6 +206,14 @@ export const packedMetaLiteSchema = {
|
|||
type: 'number',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
maxBioLength: {
|
||||
type: 'number',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
maxRemoteBioLength: {
|
||||
type: 'number',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
ads: {
|
||||
type: 'array',
|
||||
optional: false, nullable: false,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue