spec(profile): 相互リンクバナーのサイズ変更・ID付与 (MisskeyIO#696)

This commit is contained in:
まっちゃとーにゅ 2024-08-14 13:20:07 +09:00 committed by GitHub
parent 2896ff3130
commit 4c6e594ff0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 18 additions and 9 deletions

View file

@ -49,6 +49,7 @@ export class MiUserProfile {
public mutualLinkSections: {
name: string | null;
mutualLinks: {
id: string;
fileId: MiDriveFile['id'];
description: string | null;
imgSrc: string;

View file

@ -397,12 +397,13 @@ export const packedUserDetailedNotMeOnlySchema = {
items: {
type: 'object',
properties: {
id: { type: 'string', format: 'misskey:id' },
url: { type: 'string' },
fileId: { type: 'string', format: 'misskey:id' },
description: { type: 'string', nullable: true },
imgSrc: { type: 'string' },
},
required: ['url', 'fileId'],
required: ['id', 'url', 'fileId'],
},
},
},

View file

@ -35,6 +35,7 @@ import { AvatarDecorationService } from '@/core/AvatarDecorationService.js';
import { notificationRecieveConfig } from '@/models/json-schema/user.js';
import { ApiLoggerService } from '../../ApiLoggerService.js';
import { ApiError } from '../../error.js';
import { IdService } from "@/core/IdService.js";
export const meta = {
tags: ['account'],
@ -268,6 +269,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
@Inject(DI.pagesRepository)
private pagesRepository: PagesRepository,
private idService: IdService,
private userEntityService: UserEntityService,
private driveFileEntityService: DriveFileEntityService,
private globalEventService: GlobalEventService,
@ -377,6 +379,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
}
return {
id: this.idService.gen(),
url: mutualLink.url,
fileId: file.id,
imgSrc: this.driveFileEntityService.getPublicUrl(file),