Skip to content

Commit 34b1814

Browse files
committed
use async bcrypt
1 parent 97f761d commit 34b1814

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

server/models/user.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ userSchema.methods.findMatchingKey = async function findMatchingKey(
172172
for (const k of this.apiKeys) {
173173
try {
174174
/* eslint-disable no-await-in-loop */
175-
const foundOne = await bcrypt.compareSync(candidateKey, k.hashedKey);
175+
const foundOne = await bcrypt.compare(candidateKey, k.hashedKey);
176176

177177
if (foundOne) {
178178
keyObj = { isMatch: true, keyDocument: k };

0 commit comments

Comments
 (0)