diff options
| author | Adam Soltys <[email protected]> | 2022-11-08 02:36:12 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-11-08 02:36:12 -0800 |
| commit | 9b060ad4e907bf2a69d787e4a939ea30df0a3eb2 (patch) | |
| tree | d8fdcde30fde3438a26bfc1a9026862e1ce9adfa /lib | |
| parent | c2c183d5ac76813fd4f961baabb17ca7bb316926 (diff) | |
| download | coinos-server-9b060ad4e907bf2a69d787e4a939ea30df0a3eb2.tar.gz coinos-server-9b060ad4e907bf2a69d787e4a939ea30df0a3eb2.zip | |
otpsecret endpoint
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/utils.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/utils.js b/lib/utils.js index b4eb7ae4..48c351f0 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -11,7 +11,7 @@ import ln from "$lib/ln"; const { Op } = sequelize; export const requirePin = async ({ body, user }) => { - if (user && user.pin && user.pin !== body.pin) + if (!user || (user.pin && user.pin !== body.pin)) throw new Error("Invalid pin"); }; |
