summaryrefslogtreecommitdiff
path: root/packages/backend/src/server/api/endpoints/clips
diff options
context:
space:
mode:
authorsyuilo <4439005+syuilo@users.noreply.github.com>2025-06-28 20:21:21 +0900
committersyuilo <4439005+syuilo@users.noreply.github.com>2025-06-28 20:21:21 +0900
commitb8e8f3ad25fafbe0567e710eddfcced04deb03ad (patch)
tree4847b140ad2a7b5c5c86e5cda61af2ff7e444853 /packages/backend/src/server/api/endpoints/clips
parentenhance(frontend): improve MkTl rendering (diff)
downloadmisskey-b8e8f3ad25fafbe0567e710eddfcced04deb03ad.tar.gz
misskey-b8e8f3ad25fafbe0567e710eddfcced04deb03ad.tar.bz2
misskey-b8e8f3ad25fafbe0567e710eddfcced04deb03ad.zip
enhance: ページネーション(一覧表示)の基準日時を指定できるように sinceId/untilIdが指定可能なエンドポイントにおいて、sinceDate/untilDateも指定可能に
Diffstat (limited to 'packages/backend/src/server/api/endpoints/clips')
-rw-r--r--packages/backend/src/server/api/endpoints/clips/notes.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/backend/src/server/api/endpoints/clips/notes.ts b/packages/backend/src/server/api/endpoints/clips/notes.ts
index 4869ffd402..19302b1f8d 100644
--- a/packages/backend/src/server/api/endpoints/clips/notes.ts
+++ b/packages/backend/src/server/api/endpoints/clips/notes.ts
@@ -44,6 +44,8 @@ export const paramDef = {
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' },
+ sinceDate: { type: 'integer' },
+ untilDate: { type: 'integer' },
},
required: ['clipId'],
} as const;
@@ -76,7 +78,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
throw new ApiError(meta.errors.noSuchClip);
}
- const query = this.queryService.makePaginationQuery(this.notesRepository.createQueryBuilder('note'), ps.sinceId, ps.untilId)
+ const query = this.queryService.makePaginationQuery(this.notesRepository.createQueryBuilder('note'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
.innerJoin(this.clipNotesRepository.metadata.targetName, 'clipNote', 'clipNote.noteId = note.id')
.innerJoinAndSelect('note.user', 'user')
.leftJoinAndSelect('note.reply', 'reply')