lpweb: Fix dev mode

This commit is contained in:
Łukasz Magiera 2024-01-16 00:24:03 +01:00
parent a539b83512
commit eaa0cb583b
2 changed files with 2 additions and 2 deletions

View File

@ -98,7 +98,7 @@ var templateDev = os.Getenv("LOTUS_WEB_DEV") == "1"
func (a *app) executeTemplate(w http.ResponseWriter, name string, data interface{}) {
if templateDev {
fs := os.DirFS("./cmd/lotus-provider/web/hapi/web")
fs := os.DirFS("./provider/lpweb/hapi/web")
a.t = template.Must(template.ParseFS(fs, "*"))
}
if err := a.t.ExecuteTemplate(w, name, data); err != nil {

View File

@ -41,7 +41,7 @@ func GetSrv(ctx context.Context, deps *deps.Deps) (*http.Server, error) {
var static fs.FS = static
if webDev {
static = os.DirFS("./cmd/lotus-provider/web")
static = os.DirFS("./provider/lpweb")
}
mx.NotFoundHandler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {