lpweb: Fix dev mode
This commit is contained in:
parent
a539b83512
commit
eaa0cb583b
@ -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 {
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user