Files
car-crushers-portal/functions/api/me/appeals.ts
Regalijan da0ce2b188
All checks were successful
Test, Build, Deploy / Test, Build, and Deploy (push) Successful in 55s
Test, Build, Deploy / Create Sentry Release (push) Successful in 5s
Rest of it
2026-04-11 04:54:39 -04:00

22 lines
464 B
TypeScript

import { jsonResponse } from "../../common.js";
export async function onRequestGet(context: RequestContext) {
return jsonResponse(
JSON.stringify(
await context.data.prisma.appeal.findMany({
select: {
approved: true,
created_at: true,
id: true,
},
where: {
user: {
path: "id",
equals: context.data.current_user.id,
},
},
}),
),
);
}