diff options
author | Julien Dessaux | 2023-01-05 02:09:07 +0100 |
---|---|---|
committer | Julien Dessaux | 2023-01-05 02:09:07 +0100 |
commit | d7ed1196bdd44d7734d41d91a5e72a71785e0a08 (patch) | |
tree | aafae6571d5154dc5e9a061c8f54ca8e9b1287ad /database/users.js | |
parent | Added more tests (diff) | |
download | jeux-de-mots-d7ed1196bdd44d7734d41d91a5e72a71785e0a08.tar.gz jeux-de-mots-d7ed1196bdd44d7734d41d91a5e72a71785e0a08.tar.bz2 jeux-de-mots-d7ed1196bdd44d7734d41d91a5e72a71785e0a08.zip |
switched to single quotes string in eslint
Diffstat (limited to '')
-rw-r--r-- | database/users.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/database/users.js b/database/users.js index b24e3b4..cc50bdc 100644 --- a/database/users.js +++ b/database/users.js @@ -1,12 +1,12 @@ -import bcrypt from "bcrypt"; +import bcrypt from 'bcrypt'; -import db from "./db.js"; +import db from './db.js'; const saltRounds = 10; -const createUserStatement = db.prepare("INSERT INTO users (username, hash, email) VALUES (?, ?, ?);"); -const getUserByUsernameStatement = db.prepare("SELECT id, username, email from users WHERE username = ?;"); -const loginStatement = db.prepare("SELECT id, username, hash, email FROM users WHERE username = ?;"); +const createUserStatement = db.prepare('INSERT INTO users (username, hash, email) VALUES (?, ?, ?);'); +const getUserByUsernameStatement = db.prepare('SELECT id, username, email from users WHERE username = ?;'); +const loginStatement = db.prepare('SELECT id, username, hash, email FROM users WHERE username = ?;'); export async function createUser(username, password, email) { const hash = await bcrypt.hash(password, saltRounds); |