diff options
| author | Joe Carstairs <65492573+Sycamost@users.noreply.github.com> | 2023-12-24 09:48:40 +0000 |
|---|---|---|
| committer | Joe Carstairs <jcarstairs@scottlogic.com> | 2024-01-29 10:46:51 +0000 |
| commit | abe4ef05eab70d65dbe9f8dc6fb94229c8a4cb12 (patch) | |
| tree | 216a7229a290665562fade1979a0db1ea752ca89 /api/db | |
| parent | 2d0634cdc3d00b3e55cf773ff03c7dc841112d36 (diff) | |
Fix syntax error in db/setCurrentChallenge (#52)
Diffstat (limited to 'api/db')
| -rw-r--r-- | api/db/_setCurrentChallenge.ts | 6 |
1 files 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); } |
