diff --git a/src/modules/resellerOffice365/actions/getAllLinkRequests.ts b/src/modules/resellerOffice365/actions/getAllLinkRequests.ts index e095902..5baadca 100644 --- a/src/modules/resellerOffice365/actions/getAllLinkRequests.ts +++ b/src/modules/resellerOffice365/actions/getAllLinkRequests.ts @@ -16,7 +16,7 @@ export default async function getAllLinkRequests(): Promise< const requestLinks = await db.office365LinkRequest.findMany({ orderBy: [ { - status: "desc" + status: "asc" }, { requestedAt: "desc" diff --git a/src/modules/resellerOffice365/actions/getLinkRequests.ts b/src/modules/resellerOffice365/actions/getLinkRequests.ts index a5f2eeb..63bf5a8 100644 --- a/src/modules/resellerOffice365/actions/getLinkRequests.ts +++ b/src/modules/resellerOffice365/actions/getLinkRequests.ts @@ -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 }, },