added InitMiddlewares and delete jwtFromBody
Build and Test / build-and-test-backend (push) Successful in 28s
Build and Test / build-and-test-frontend (push) Successful in 33s

This commit is contained in:
wt committed 2025-08-10 14:37:07 +07:00
1 parent 90e5863adc
commit 303b9344f8
3 files changed
+30 -71

No files matched your search

@@ -1,36 +0,0 @@
package internaljwt
// import (
// "backend/model"
// "github.com/gofiber/fiber/v2"
// )
// func JwtFromBody(c *fiber.Ctx) error {
// req := new(model.TokenRequest)
// if err := c.BodyParser(req); err != nil {
// return c.Status(
// fiber.StatusBadRequest,
// ).JSON(
// fiber.Map{
// "error": "Cannot parse request body",
// },
// )
// }
// if req.Token == "" {
// return c.Status(
// fiber.StatusBadRequest,
// ).JSON(
// fiber.Map{
// "error": "Token not found in request body",
// },
// )
// }
// c.Request().Header.Set(
// "Authorization", "Bearer "+req.Token,
// )
// return c.Next()
// }