Skip to content

Commit 7c3cc5b

Browse files
committed
bug: remove old mongo remove () method with deleteOne in otp
1 parent 951e873 commit 7c3cc5b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

backend/controllers/auth.controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ module.exports.sendOtp = async (req, res) => {
122122

123123
const existingOtp = await otpSchema.findOne({ userId: existingUser._id });
124124
if (existingOtp) {
125-
await existingOtp.remove();
125+
await existingOtp.deleteOne();
126126
}
127127
const newOtp = new otpSchema(
128128
{

0 commit comments

Comments
 (0)