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({
|
const requestLinks = await db.office365LinkRequest.findMany({
|
||||||
orderBy: [
|
orderBy: [
|
||||||
{
|
{
|
||||||
status: "desc"
|
status: "asc"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
requestedAt: "desc"
|
requestedAt: "desc"
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,14 @@ export default async function getLinkRequests(): Promise<
|
||||||
if (!user) return unauthorized();
|
if (!user) return unauthorized();
|
||||||
|
|
||||||
const requests = await db.office365LinkRequest.findMany({
|
const requests = await db.office365LinkRequest.findMany({
|
||||||
|
orderBy: [
|
||||||
|
{
|
||||||
|
status: "asc"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
requestedAt: "desc"
|
||||||
|
}
|
||||||
|
],
|
||||||
where: {
|
where: {
|
||||||
creator: { id: user.id },
|
creator: { id: user.id },
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user