43 lines
829 B
Go
43 lines
829 B
Go
|
/*
|
||
|
Handler Information:
|
||
|
Route: /dev
|
||
|
Has View: yes
|
||
|
Needs Auth: yes
|
||
|
*/
|
||
|
|
||
|
package handlers
|
||
|
|
||
|
import (
|
||
|
"github.com/go-webauthn/webauthn/webauthn"
|
||
|
"github.com/gofiber/fiber/v2"
|
||
|
"github.com/gofiber/fiber/v2/middleware/session"
|
||
|
"github.com/uptrace/bun"
|
||
|
"go.uber.org/zap"
|
||
|
"omnibill.net/omnibill/web/utils"
|
||
|
|
||
|
. "omnibill.net/omnibill/web/utils/handler"
|
||
|
PAGE_VIEW "omnibill.net/omnibill/web/views/dev"
|
||
|
)
|
||
|
|
||
|
func init() {
|
||
|
Register(&DevHandler{Path: "dev"})
|
||
|
}
|
||
|
|
||
|
type DevHandler struct {
|
||
|
Path string `omnibill:"requireAuth"`
|
||
|
Db *bun.DB
|
||
|
Logger *zap.Logger
|
||
|
|
||
|
AuthSessionStore *session.Store
|
||
|
SessionStore *session.Store
|
||
|
|
||
|
Session *session.Session
|
||
|
AuthSession *session.Session
|
||
|
|
||
|
WebAuthn *webauthn.WebAuthn
|
||
|
}
|
||
|
|
||
|
func (h DevHandler) Get(c *fiber.Ctx) error {
|
||
|
return utils.Render(c, PAGE_VIEW.Show())
|
||
|
}
|