diff options
| author | Adam Soltys <[email protected]> | 2023-01-06 14:11:52 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-01-06 14:11:52 -0800 |
| commit | 6f7ad86583ee4e9e359829b55cb041d014902e07 (patch) | |
| tree | cdc90c4f83e52d2db2f74f6743a891b31488f49f | |
| parent | 8076c6c8da495331a6013671f80f178e57d42d19 (diff) | |
| download | coinos-server-6f7ad86583ee4e9e359829b55cb041d014902e07.tar.gz coinos-server-6f7ad86583ee4e9e359829b55cb041d014902e07.zip | |
prettier
| -rw-r--r-- | db/models/users.js | 10 | ||||
| -rw-r--r-- | 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({}); |
