summaryrefslogtreecommitdiff
path: root/api/db/_setCurrentChallenge.ts
diff options
context:
space:
mode:
Diffstat (limited to 'api/db/_setCurrentChallenge.ts')
-rw-r--r--api/db/_setCurrentChallenge.ts6
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);
}