Add sort
This commit is contained in:
parent
27fdced0c9
commit
1918a16857
|
|
@ -16,7 +16,7 @@ export default async function getAllLinkRequests(): Promise<
|
|||
const requestLinks = await db.office365LinkRequest.findMany({
|
||||
orderBy: [
|
||||
{
|
||||
status: "desc"
|
||||
status: "asc"
|
||||
},
|
||||
{
|
||||
requestedAt: "desc"
|
||||
|
|
|
|||
|
|
@ -18,6 +18,14 @@ export default async function getLinkRequests(): Promise<
|
|||
if (!user) return unauthorized();
|
||||
|
||||
const requests = await db.office365LinkRequest.findMany({
|
||||
orderBy: [
|
||||
{
|
||||
status: "asc"
|
||||
},
|
||||
{
|
||||
requestedAt: "desc"
|
||||
}
|
||||
],
|
||||
where: {
|
||||
creator: { id: user.id },
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user