From abe4ef05eab70d65dbe9f8dc6fb94229c8a4cb12 Mon Sep 17 00:00:00 2001 From: Joe Carstairs <65492573+Sycamost@users.noreply.github.com> Date: Sun, 24 Dec 2023 09:48:40 +0000 Subject: Fix syntax error in db/setCurrentChallenge (#52) --- api/db/_setCurrentChallenge.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/db/_setCurrentChallenge.ts b/api/db/_setCurrentChallenge.ts index 7d9450b..0858a56 100644 --- a/api/db/_setCurrentChallenge.ts +++ b/api/db/_setCurrentChallenge.ts @@ -11,13 +11,13 @@ export default async function setCurrentChallenge(userId: string, challenge: str ${userId}, ${challenge} ); - `); + `; const update = ` UPDATE TABLE ${CURRENT_CHALLENGES.name} SET ${CURRENT_CHALLENGES.fields.currentChallenge} = ${challenge} WHERE ${CURRENT_CHALLENGES.fields.userId} = '${userId}'; - `); + `; await sql.query(` BEGIN @@ -28,7 +28,7 @@ export default async function setCurrentChallenge(userId: string, challenge: str ${update}; ELSE ${insert}; - ` + `); } catch (err) { throw new Error(`Failed to set current challenge for user with ID ${userId} in database.`, err); } -- cgit v1.2.3