Skip to content
Snippets Groups Projects
Commit c0703d0a authored by Ophestra's avatar Ophestra
Browse files

fix paths

parent d1715a68
No related branches found
No related tags found
No related merge requests found
...@@ -93,13 +93,13 @@ func registerWebpage() { ...@@ -93,13 +93,13 @@ func registerWebpage() {
context.Redirect(http.StatusTemporaryRedirect, "web") context.Redirect(http.StatusTemporaryRedirect, "web")
}) })
if stat, err := os.Stat("assets"); err == nil && stat.IsDir() { if stat, err := os.Stat("assets/public"); err == nil && stat.IsDir() {
log.Info("Serving web interface from filesystem.") log.Info("Serving web interface from filesystem.")
router.Static("/web", "assets") router.Static("/web", "assets/public")
} else { } else {
log.Info("Serving bundled assets.") log.Info("Serving bundled assets.")
var public fs.FS var public fs.FS
public, err = fs.Sub(assets, "assets") public, err = fs.Sub(assets, "assets/public")
if err != nil { if err != nil {
log.Fatalf("Error getting subdirectory, %s", err) log.Fatalf("Error getting subdirectory, %s", err)
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment