From 41926c10ea2e8496ce4b528262f5047ccbe6f155 Mon Sep 17 00:00:00 2001 From: Bobby Date: Sat, 7 Mar 2026 14:25:54 +0530 Subject: Implement authentication system with login/logout functionality and session management --- utils/meta/body.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 utils/meta/body.go (limited to 'utils/meta') diff --git a/utils/meta/body.go b/utils/meta/body.go new file mode 100644 index 0000000..ce10bde --- /dev/null +++ b/utils/meta/body.go @@ -0,0 +1,12 @@ +package meta + +import "github.com/gofiber/fiber/v2" + +func Body[T any](context *fiber.Ctx) (T, error) { + var body T + if parseError := context.BodyParser(&body); parseError != nil { + return body, parseError + } + + return body, nil +} -- cgit v1.2.3