feat: add music to user profiles (#7)
This commit is contained in:
@@ -612,6 +612,7 @@ export class UserEntityService implements OnModuleInit {
|
||||
location: profile!.location,
|
||||
birthday: profile!.birthday,
|
||||
listenbrainz: profile!.listenbrainz,
|
||||
musicUrl: profile!.musicUrl,
|
||||
lang: profile!.lang,
|
||||
fields: profile!.fields,
|
||||
verifiedLinks: profile!.verifiedLinks,
|
||||
|
||||
@@ -43,6 +43,12 @@ export class MiUserProfile {
|
||||
})
|
||||
public listenbrainz: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 2048, nullable: true,
|
||||
comment: 'The music URL of the User.',
|
||||
})
|
||||
public musicUrl: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 2048, nullable: true,
|
||||
comment: 'The description (bio) of the User.',
|
||||
|
||||
@@ -201,6 +201,7 @@ export const paramDef = {
|
||||
autoAcceptFollowed: { type: 'boolean' },
|
||||
noCrawle: { type: 'boolean' },
|
||||
preventAiLearning: { type: 'boolean' },
|
||||
musicUrl: { type: 'string', nullable: true },
|
||||
noindex: { type: 'boolean' },
|
||||
requireSigninToViewContents: { type: 'boolean' },
|
||||
makeNotesFollowersOnlyBefore: { type: 'integer', nullable: true },
|
||||
@@ -335,6 +336,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||
if (ps.location !== undefined) profileUpdates.location = ps.location;
|
||||
if (ps.birthday !== undefined) profileUpdates.birthday = ps.birthday;
|
||||
if (ps.listenbrainz !== undefined) profileUpdates.listenbrainz = ps.listenbrainz;
|
||||
if (ps.musicUrl !== undefined) profileUpdates.musicUrl = ps.musicUrl;
|
||||
if (ps.followingVisibility !== undefined) profileUpdates.followingVisibility = ps.followingVisibility;
|
||||
if (ps.followersVisibility !== undefined) profileUpdates.followersVisibility = ps.followersVisibility;
|
||||
if (ps.chatScope !== undefined) updates.chatScope = ps.chatScope;
|
||||
|
||||
Reference in New Issue
Block a user