Skip to content

Commit

Permalink
fix(users): 暂时关闭reCAPTCHA验证 (#1282)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiangmy21 authored Sep 21, 2023
1 parent 2aec355 commit 1e8bbae
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/routes/users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit 1e8bbae

Please sign in to comment.