MCPcopy
hub / github.com/tinyauthapp/tinyauth / Init

Method Init

internal/middleware/ui_middleware.go:26–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24}
25
26func (m *UIMiddleware) Init() error {
27 ui, err := fs.Sub(assets.FrontendAssets, "dist")
28
29 if err != nil {
30 return err
31 }
32
33 m.uiFs = ui
34 m.uiFileServer = http.FileServerFS(ui)
35
36 return nil
37}
38
39func (m *UIMiddleware) Middleware() gin.HandlerFunc {
40 return func(c *gin.Context) {

Callers 1

setupRouterMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected