You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
359 B
17 lines
359 B
package common
|
|
|
|
import (
|
|
"strings"
|
|
"github.com/gofiber/fiber/v2"
|
|
"github.com/gofiber/fiber/v2/middleware/session"
|
|
)
|
|
|
|
var STORE *session.Store
|
|
|
|
func Page(path string) (func(c *fiber.Ctx) error) {
|
|
page_id := strings.ReplaceAll(path, "/", "-") + "-page"
|
|
|
|
return func (c *fiber.Ctx) error {
|
|
return c.Render(path, fiber.Map{"PageId": page_id})
|
|
}
|
|
}
|
|
|