Skip to content

Commit

Permalink
Fix "Can't edit own bio" (#517)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fiery-132 authored Oct 15, 2024
1 parent fb7b62b commit cdf5186
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ import * as m from "$paraglide/messages";

export const load: PageServerLoad = async ({ locals, params }) => {
const { prisma, user } = locals;
authorize(apiNames.MEMBER.UPDATE, user);
if (user?.studentId !== params.studentId) {
authorize(apiNames.MEMBER.UPDATE, user);
}

const member = await prisma.member.findUnique({
where: {
Expand Down

0 comments on commit cdf5186

Please sign in to comment.