上限をつけたりした
Signed-off-by: mattyatea <mattyacocacora0@gmail.com>
This commit is contained in:
parent
c6cccd791d
commit
334894f7bf
|
@ -34,7 +34,7 @@ export class AbuseUserReportEntityService {
|
|||
src: MiAbuseUserReport['id'] | MiAbuseUserReport,
|
||||
) {
|
||||
const report = typeof src === 'object' ? src : await this.abuseUserReportsRepository.findOneByOrFail({ id: src });
|
||||
const notes = (report.notes.length === 0) ? report.notes : [];
|
||||
const notes = [];
|
||||
|
||||
if (report.noteIds && report.noteIds.length > 0) {
|
||||
for (const x of report.noteIds) {
|
||||
|
@ -45,6 +45,8 @@ export class AbuseUserReportEntityService {
|
|||
}
|
||||
notes.push(await this.noteEntityService.pack(x));
|
||||
}
|
||||
} else if (report.notes.length > 0) {
|
||||
notes.push(...(report.notes));
|
||||
}
|
||||
|
||||
console.log(report.notes.length, null, notes);
|
||||
|
|
|
@ -53,7 +53,7 @@ export const paramDef = {
|
|||
properties: {
|
||||
userId: { type: 'string', format: 'misskey:id' },
|
||||
comment: { type: 'string', minLength: 1, maxLength: 2048 },
|
||||
noteIds: { type: 'array', items: { type: 'string', format: 'misskey:id' } },
|
||||
noteIds: { type: 'array', items: { type: 'string', format: 'misskey:id', maxLength: 16 } },
|
||||
},
|
||||
required: ['userId', 'comment'],
|
||||
} as const;
|
||||
|
|
Loading…
Reference in New Issue