From 5838916e49197b237d6b2ab3ac59c519ca260bf3 Mon Sep 17 00:00:00 2001 From: xiangmy21 <2248278431@qq.com> Date: Thu, 21 Sep 2023 13:31:50 +0800 Subject: [PATCH] =?UTF-8?q?fix(users):=20=E6=9A=82=E6=97=B6=E5=85=B3?= =?UTF-8?q?=E9=97=ADreCAPTCHA=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/routes/users.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/routes/users.ts b/src/routes/users.ts index b167396c..25a674a8 100644 --- a/src/routes/users.ts +++ b/src/routes/users.ts @@ -3,7 +3,7 @@ import express from "express"; import jwt from "jsonwebtoken"; import Email from "../models/email"; import User from "../models/user"; -import recaptcha from "../middlewares/recaptcha"; +// import recaptcha from "../middlewares/recaptcha"; import { sendEmail } from "../helpers/email"; import { verifyEmailTemplate, @@ -54,7 +54,8 @@ router.put("/delete", async(req, res) => { } }) -router.post("/", recaptcha, async (req, res) => { +// router.post("/", recaptcha, async (req, res) => { +router.post("/", async (req, res) => { const { email, password } = req.body; if (!email || !password) { @@ -209,7 +210,7 @@ router.post("/verify", async (req, res) => { const { action, type } = req.body; if (action === "request") { - await new Promise((resolve) => recaptcha(req, res, resolve)); + // await new Promise((resolve) => recaptcha(req, res, resolve)); if (type === "regular") { const { email } = req.body; @@ -378,7 +379,7 @@ router.post("/reset", async (req, res) => { const { action } = req.body; if (action === "request") { - await new Promise((resolve) => recaptcha(req, res, resolve)); + // await new Promise((resolve) => recaptcha(req, res, resolve)); const { email } = req.body;