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 },
sinceId: { type: "string", format: "misskey:id" },
untilId: { type: "string", format: "misskey:id" },
sinceDate: { type: "integer" },
untilDate: { type: "integer" },
following: { type: "boolean", default: false },
unreadOnly: { type: "boolean", default: false },
markAsRead: { type: "boolean", default: true },
@ -87,6 +89,8 @@ export default define(meta, paramDef, async (ps, user) => {
Notifications.createQueryBuilder("notification"),
ps.sinceId,
ps.untilId,
ps.sinceDate,
ps.untilDate
)
.andWhere("notification.notifieeId = :meId", { meId: user.id })
.leftJoinAndSelect("notification.notifier", "notifier")