update kontor-fiber to use Go Fiber v3
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 4s

This commit is contained in:
2026-09-20 02:08:56 +02:00
parent 8f5a384e89
commit ad09386a7a
40 changed files with 545 additions and 279 deletions
+3 -3
View File
@@ -5,12 +5,12 @@ import (
"kontor-api-fiber/pkg/schema"
"kontor-api-fiber/pkg/utils"
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v3"
"github.com/golang-jwt/jwt/v5"
"github.com/uptrace/bun"
)
func Login(c *fiber.Ctx) error {
func Login(c fiber.Ctx) error {
user := c.FormValue("user")
pass := c.FormValue("pass")
@@ -39,7 +39,7 @@ func Login(c *fiber.Ctx) error {
return c.JSON(fiber.Map{"token": token})
}
func Restricted(c *fiber.Ctx) error {
func Restricted(c fiber.Ctx) error {
user := c.Locals("user").(*jwt.Token)
claims := user.Claims.(jwt.MapClaims)
name := claims["name"].(string)