Skip to content

Commit

Permalink
test: add test to past build
Browse files Browse the repository at this point in the history
  • Loading branch information
AkekoChan committed Mar 12, 2024
1 parent 78b91a6 commit 9d70c22
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
7 changes: 7 additions & 0 deletions server/__test__/Api.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { describe, it, expect } from "vitest";

describe("Simple test :D", () => {
it("should pass", () => {
expect(true).toBeTruthy();
});
});
1 change: 0 additions & 1 deletion server/__test__/User.test.js

This file was deleted.

14 changes: 11 additions & 3 deletions server/routes/auth.routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ let handleStoreError = function (error) {
};

let bruteforce = new ExpressBrute(store, {
freeRetries: 1000,
freeRetries: 5,
minWait: 5 * 60 * 1000, // 5 minutes
maxWait: 10 * 60 * 1000, // 1 hour,
failCallback: failCallback,
Expand All @@ -52,7 +52,15 @@ router.get("/token", auth.require, authController.token);

router.post("/send-otp", bruteforce.prevent, otpController.sendOTP);
router.post("/verify-otp", bruteforce.prevent, otpController.verifyOTP);
router.post("/forget-password", bruteforce.prevent, forgetPasswordController.forgetPassword);
router.post("/reset-password/:token", bruteforce.prevent, forgetPasswordController.resetPassword);
router.post(
"/forget-password",
bruteforce.prevent,
forgetPasswordController.forgetPassword
);
router.post(
"/reset-password/:token",
bruteforce.prevent,
forgetPasswordController.resetPassword
);

export default router;

0 comments on commit 9d70c22

Please sign in to comment.