Skip to content

Commit

Permalink
feat: uifs default
Browse files Browse the repository at this point in the history
  • Loading branch information
vcastellm committed Sep 29, 2024
1 parent 81c989c commit 896e7a7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion dkron/ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ const uiPathPrefix = "ui/"
var uiDist embed.FS

// UI registers UI specific routes on the gin RouterGroup.
func (h *HTTPTransport) UI(r *gin.RouterGroup, uifs embed.FS) {
func (h *HTTPTransport) UI(r *gin.RouterGroup, uifs *embed.FS) {
if uifs == nil {
uifs = &uiDist
}

// If we are visiting from a browser redirect to the dashboard
r.GET("/", func(c *gin.Context) {
switch c.NegotiateFormat(gin.MIMEHTML) {
Expand Down

0 comments on commit 896e7a7

Please sign in to comment.