Skip to content

Commit

Permalink
add auto redirect to /ui
Browse files Browse the repository at this point in the history
  • Loading branch information
reddec committed Jan 7, 2019
1 parent 6a12924 commit 059f6a6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plugins/adp_rest.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ func (p *RestPlugin) Prepare(ctx context.Context, pl *pool.Pool) error {
router.Use(CORSMiddleware())
}
router.StaticFS("/ui/", &assetfs.AssetFS{Asset: Asset, AssetDir: AssetDir, AssetInfo: AssetInfo, Prefix: ""})
router.GET("/", func(gctx *gin.Context) {
gctx.Redirect(http.StatusTemporaryRedirect, "ui")
})
router.GET("/supervisors", func(gctx *gin.Context) {
var names = make([]string, 0)
for _, sv := range pl.Supervisors() {
Expand Down

0 comments on commit 059f6a6

Please sign in to comment.