Open danieladugyan opened 2 weeks ago
Remove/explain odd usage of Prisma.allSettled. Maybe it should be like this instead?
// src/routes/(app)/onboarding/+page.server.ts export const load: PageServerLoad = async ({ locals }) => { const { prisma } = locals; let member: Member | null; try { member = await prisma.member.findUnique({ where: { studentId: locals.user?.studentId, }, }); } catch (e) { redirect(302, "/"); // why this though? } if (!member) { throw error(404, m.onboarding_errors_memberNotFound()); } return { form: await superValidate(member, memberSchema), member, }; };
Remove/explain odd usage of Prisma.allSettled. Maybe it should be like this instead?