complete middleware

This commit is contained in:
rafiarrafif
2025-05-13 15:38:58 +07:00
parent 9cb84372b8
commit b8033f4e3d
3 changed files with 12 additions and 16 deletions

View File

@ -5,13 +5,6 @@ import { authVerification } from "./controller/authVerification.controller";
export const authModule = new Elysia({ prefix: "/auth" })
.post("/legacy", loginWithPassword)
.post("/verification", authVerification)
.get(
"/test",
() => {
return "PASSED";
},
{
beforeHandle: authMiddleware,
}
);
.post("/verification", authVerification, {
beforeHandle: authMiddleware,
});

View File

@ -1,6 +1,5 @@
import { AppError } from "../../../helpers/error/instances/app";
import { jwtDecode } from "../../../helpers/http/jwt/decode";
import { jwtEncode } from "../../../helpers/http/jwt/encode";
export const authVerificationService = (cookie: string) => {
try {