mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 08:28:19 +01:00
Correct wrong notification endpoint returns
This commit is contained in:
parent
372a209d32
commit
55ea57391b
|
|
@ -90,23 +90,23 @@ export default apiRoute<typeof meta, typeof schema>(
|
||||||
// @ts-expect-error Yes I KNOW the types are wrong
|
// @ts-expect-error Yes I KNOW the types are wrong
|
||||||
notification,
|
notification,
|
||||||
// @ts-expect-error Yes I KNOW the types are wrong
|
// @ts-expect-error Yes I KNOW the types are wrong
|
||||||
{ lt, gte, gt, and, or, eq, not },
|
{ lt, gte, gt, and, eq, not, inArray },
|
||||||
) =>
|
) =>
|
||||||
or(
|
|
||||||
and(
|
and(
|
||||||
max_id
|
max_id ? lt(notification.id, max_id) : undefined,
|
||||||
? lt(notification.id, max_id)
|
|
||||||
: undefined,
|
|
||||||
since_id
|
since_id
|
||||||
? gte(notification.id, since_id)
|
? gte(notification.id, since_id)
|
||||||
: undefined,
|
: undefined,
|
||||||
min_id
|
min_id ? gt(notification.id, min_id) : undefined,
|
||||||
? gt(notification.id, min_id)
|
|
||||||
: undefined,
|
|
||||||
),
|
|
||||||
eq(notification.notifiedId, user.id),
|
eq(notification.notifiedId, user.id),
|
||||||
eq(notification.accountId, account_id),
|
eq(notification.accountId, account_id),
|
||||||
not(eq(notification.accountId, user.id)),
|
not(eq(notification.accountId, user.id)),
|
||||||
|
types
|
||||||
|
? inArray(notification.type, types)
|
||||||
|
: undefined,
|
||||||
|
exclude_types
|
||||||
|
? not(inArray(notification.type, exclude_types))
|
||||||
|
: undefined,
|
||||||
),
|
),
|
||||||
limit,
|
limit,
|
||||||
// @ts-expect-error Yes I KNOW the types are wrong
|
// @ts-expect-error Yes I KNOW the types are wrong
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue