From 062bc43f5a92876bd0a7d2f512227aa5d3c2281b Mon Sep 17 00:00:00 2001 From: Kayne Ruse Date: Sat, 11 Dec 2021 11:53:13 +0000 Subject: [PATCH] BUGFIX: sending account index via post validation hook --- package-lock.json | 4 ++-- package.json | 2 +- server/auth/validation.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index c0d6a8b..851ec46 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "auth-server", - "version": "1.4.7", + "version": "1.4.8", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "auth-server", - "version": "1.4.7", + "version": "1.4.8", "license": "ISC", "dependencies": { "bcryptjs": "^2.4.3", diff --git a/package.json b/package.json index ebc4dca..5ad61d1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "auth-server", - "version": "1.4.7", + "version": "1.4.8", "description": "An API centric auth server. Uses Sequelize and mariaDB by default.", "main": "server/server.js", "scripts": { diff --git a/server/auth/validation.js b/server/auth/validation.js index 87f959b..114e916 100644 --- a/server/auth/validation.js +++ b/server/auth/validation.js @@ -20,7 +20,7 @@ const route = async (req, res) => { } //move data to the accounts table - const [account] = await accounts.upsert({ + const account = await accounts.create({ email: info.email, username: info.username, hash: info.hash,