diff options
| author | Adam Soltys <[email protected]> | 2020-05-11 20:34:37 -0400 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2020-05-11 20:34:37 -0400 |
| commit | 2afea831615a76e18f57cb1a87f6733908db410a (patch) | |
| tree | dc0cda2483517b85816775160b35e5c717848f25 | |
| parent | 23a9c10cc6ad2974ab73747606cdbe6015d861b9 (diff) | |
| parent | c1c615a8308701f4c20708bf024e83c10bc34f75 (diff) | |
| download | coinos-server-2afea831615a76e18f57cb1a87f6733908db410a.tar.gz coinos-server-2afea831615a76e18f57cb1a87f6733908db410a.zip | |
Merge branch 'master' of https://github.com/asoltys/coinos-server
| -rw-r--r-- | lib/utils.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/utils.js b/lib/utils.js index cd1b3d69..5674f2fc 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -22,6 +22,7 @@ getUser = async (username, transaction) => { } let user = await db.User.findOne(params); + if (!user) throw new Error("User not found"); user = user.get({ plain: true }); |
