From 6f7ad86583ee4e9e359829b55cb041d014902e07 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 6 Jan 2023 14:11:52 -0800 Subject: prettier --- db/models/users.js | 10 +++++----- routes/users.js | 3 +-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/db/models/users.js b/db/models/users.js index 23dab0bf..72680fd8 100644 --- a/db/models/users.js +++ b/db/models/users.js @@ -1,5 +1,5 @@ import db from "$db/db"; -import { DataTypes } from '@sequelize/core'; +import { DataTypes } from "@sequelize/core"; const attributes = { id: { @@ -140,7 +140,7 @@ const attributes = { unit: { type: DataTypes.STRING(255), allowNull: true, - defaultValue: 'SAT', + defaultValue: "SAT", primaryKey: false, autoIncrement: false, comment: null, @@ -225,13 +225,13 @@ const attributes = { field: "twofa" }, cipher: { - type: DataTypes.STRING(255), + type: DataTypes.STRING(255) }, pubkey: { - type: DataTypes.STRING(255), + type: DataTypes.STRING(255) }, salt: { - type: DataTypes.STRING(255), + type: DataTypes.STRING(255) }, pin: { type: DataTypes.STRING(255), diff --git a/routes/users.js b/routes/users.js index 20b3bfee..d2cb1540 100644 --- a/routes/users.js +++ b/routes/users.js @@ -363,8 +363,7 @@ let login = async (req, res) => { if ( !user || - (user.password && - !(await bcrypt.compare(password, user.password))) + (user.password && !(await bcrypt.compare(password, user.password))) ) { warn("invalid username or password attempt", username); return res.code(401).send({}); -- cgit v1.2.3