Fix timeline order

This commit is contained in:
Jesse Wierzbinski 2023-11-26 12:04:38 -10:00
parent 63b13ca5e8
commit 8c870cdad3
No known key found for this signature in database
6 changed files with 18 additions and 11 deletions

View file

@ -67,7 +67,7 @@ export default async (
include: statusAndUserRelations, include: statusAndUserRelations,
take: limit ?? 20, take: limit ?? 20,
orderBy: { orderBy: {
id: "asc", id: "desc",
}, },
}); });

View file

@ -72,7 +72,7 @@ export default async (req: Request): Promise<Response> => {
}, },
}, },
orderBy: { orderBy: {
id: "asc", id: "desc",
}, },
take: limit, take: limit,
}); });

View file

@ -86,7 +86,7 @@ export default async (
}, },
take: limit, take: limit,
orderBy: { orderBy: {
id: "asc", id: "desc",
}, },
}); });

View file

@ -87,7 +87,7 @@ export default async (
}, },
take: limit, take: limit,
orderBy: { orderBy: {
id: "asc", id: "desc",
}, },
}); });

View file

@ -51,6 +51,8 @@ export default async (req: Request): Promise<Response> => {
gt: min_id ?? undefined, gt: min_id ?? undefined,
}, },
author: { author: {
OR: [
{
relationships: { relationships: {
some: { some: {
subjectId: user.id, subjectId: user.id,
@ -58,11 +60,16 @@ export default async (req: Request): Promise<Response> => {
}, },
}, },
}, },
{
id: user.id,
},
],
},
}, },
include: statusAndUserRelations, include: statusAndUserRelations,
take: limit, take: limit,
orderBy: { orderBy: {
id: "asc", id: "desc",
}, },
}); });

View file

@ -62,7 +62,7 @@ export default async (req: Request): Promise<Response> => {
include: statusAndUserRelations, include: statusAndUserRelations,
take: limit, take: limit,
orderBy: { orderBy: {
id: "asc", id: "desc",
}, },
}); });