Add await to catch errors in user service

This commit is contained in:
Maciej Ziarkowski 2019-11-14 16:16:20 +00:00
parent 59b04d2d93
commit 96b4a73573

View File

@ -106,7 +106,7 @@ async function getUserById(id: string) {
async function getUserByEmail(email: string) {
try {
return db.one(
return await db.one(
`SELECT
user_id, username, email
FROM
@ -123,7 +123,7 @@ async function getUserByEmail(email: string) {
async function getNewUserAPIKey(id: string) {
try{
return db.one(
return await db.one(
`UPDATE
users
SET