1
Fork 0
mirror of https://github.com/Steffo99/festa.git synced 2024-12-22 22:54:22 +00:00

Mark model as unused in canEdit

This commit is contained in:
Steffo 2022-05-31 16:01:34 +02:00
parent 15c8d928c0
commit ab89b3e464
Signed by: steffo
GPG key ID: 6965406171929D01

View file

@ -12,7 +12,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse<
handleInterrupts(res, async () => {
const user = await authorizeUser(req, res)
const canEdit = async (model: Model, obj?: Event) => {
const canEdit = async (_model: Model, obj?: Event) => {
if(obj && obj.creatorId !== user.id) {
throw new Interrupt(403, {error: "Only the creator can edit an event"})
}