Files
car-crushers-portal/functions/api/short-links/list.ts
Regalijan 5c17f87f89
All checks were successful
Test, Build, Deploy / Test, Build, and Deploy (push) Successful in 58s
Test, Build, Deploy / Create Sentry Release (push) Successful in 6s
Migrate the rest of the easy stuff
2026-04-11 04:32:09 -04:00

19 lines
413 B
TypeScript

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