1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-11-14 18:50:50 -05:00

consistent arrow functions

This commit is contained in:
2025-03-12 18:10:11 -04:00
parent 6a57fde2f1
commit e61ca889a7
39 changed files with 121 additions and 126 deletions

View File

@@ -4,12 +4,12 @@ import type { hits as Hits } from "@prisma/client";
export const revalidate = 900; // 15 mins
export async function GET(): Promise<
export const GET = async (): Promise<
NextResponse<{
total: Pick<Hits, "hits">;
pages: Hits[];
}>
> {
> => {
// fetch all rows from db sorted by most hits
const pages = await prisma.hits.findMany({
orderBy: [
@@ -28,4 +28,4 @@ export async function GET(): Promise<
});
return NextResponse.json({ total, pages });
}
};