From e6826690c3e6242fd906defdc9d21d52efc0dbc3 Mon Sep 17 00:00:00 2001 From: Regalijan Date: Wed, 20 Nov 2024 16:59:02 -0500 Subject: [PATCH] Make solve endpoint work again --- functions/api/events-team/events/[id]/solve.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/api/events-team/events/[id]/solve.ts b/functions/api/events-team/events/[id]/solve.ts index 8a9fd57..15c1e31 100644 --- a/functions/api/events-team/events/[id]/solve.ts +++ b/functions/api/events-team/events/[id]/solve.ts @@ -2,7 +2,7 @@ export async function onRequestPost(context: RequestContext) { await context.env.D1.prepare( "UPDATE events SET answered_at = ? WHERE id = ?;", ) - .bind(Date.now(), context.params.id) + .bind(Date.now(), context.data.event.id) .run(); return new Response(null, {