|
|
@@ -108,7 +108,7 @@ export async function POST(
|
|
|
// Return existing summary
|
|
|
const cintasSummaries = await prisma.cintasSummary.findMany({
|
|
|
where: { importId },
|
|
|
- orderBy: { week: 'asc' }
|
|
|
+ orderBy: { weekId: 'desc' }
|
|
|
});
|
|
|
|
|
|
return NextResponse.json({
|
|
|
@@ -133,7 +133,7 @@ export async function POST(
|
|
|
// Fetch the newly generated summary
|
|
|
const cintasSummaries = await prisma.cintasSummary.findMany({
|
|
|
where: { importId },
|
|
|
- orderBy: { week: 'asc' }
|
|
|
+ orderBy: { weekId: 'desc' }
|
|
|
});
|
|
|
|
|
|
return NextResponse.json({
|