add tenant page

This commit is contained in:
Rogee
2025-01-10 16:00:03 +08:00
parent 4d11403c3a
commit 2ba8ed7dbd
5 changed files with 168 additions and 0 deletions

View File

@@ -5,6 +5,13 @@ import (
"github.com/pkg/errors"
)
func Local[T any](key string) func(fiber.Ctx) (T, error) {
return func(ctx fiber.Ctx) (T, error) {
v := fiber.Locals[T](ctx, key)
return v, nil
}
}
func Path[T fiber.GenericType](key string) func(fiber.Ctx) (T, error) {
return func(ctx fiber.Ctx) (T, error) {
v := fiber.Params[T](ctx, key)