Sort notifications by createdAt
ci/woodpecker/tag/ociImageTag Pipeline was successful Details

This commit is contained in:
Natty 2024-01-01 21:10:20 +01:00
parent 4a7cd41a90
commit 96c748f807
Signed by: natty
GPG Key ID: BF6CB659ADEE60EC
1 changed files with 4 additions and 0 deletions

View File

@ -37,6 +37,8 @@ export const paramDef = {
limit: { type: "integer", minimum: 1, maximum: 100, default: 10 }, limit: { type: "integer", minimum: 1, maximum: 100, default: 10 },
sinceId: { type: "string", format: "misskey:id" }, sinceId: { type: "string", format: "misskey:id" },
untilId: { type: "string", format: "misskey:id" }, untilId: { type: "string", format: "misskey:id" },
sinceDate: { type: "integer" },
untilDate: { type: "integer" },
following: { type: "boolean", default: false }, following: { type: "boolean", default: false },
unreadOnly: { type: "boolean", default: false }, unreadOnly: { type: "boolean", default: false },
markAsRead: { type: "boolean", default: true }, markAsRead: { type: "boolean", default: true },
@ -87,6 +89,8 @@ export default define(meta, paramDef, async (ps, user) => {
Notifications.createQueryBuilder("notification"), Notifications.createQueryBuilder("notification"),
ps.sinceId, ps.sinceId,
ps.untilId, ps.untilId,
ps.sinceDate,
ps.untilDate
) )
.andWhere("notification.notifieeId = :meId", { meId: user.id }) .andWhere("notification.notifieeId = :meId", { meId: user.id })
.leftJoinAndSelect("notification.notifier", "notifier") .leftJoinAndSelect("notification.notifier", "notifier")