lpweb: Fix dev mode

This commit is contained in:
Łukasz Magiera 2024-01-12 13:38:43 +01:00
parent 4c2235a686
commit 7798916a9a
2 changed files with 6 additions and 5 deletions

View File

@ -8,7 +8,11 @@
<td>{{.Start}}</td>
<td>{{.End}}</td>
<td>{{if .Result}}<span class="success">success</span>{{else}}<span class="error">error</span>{{end}}</td>
<td>{{.Err}}</td>
<td style="max-width: 25vh">
<div style="overflow: hidden; white-space: nowrap; text-overflow: ellipsis" title="{{.Err}}">
{{.Err}}
</div>
</td>
</tr>
{{end}}
{{end}}

View File

@ -39,12 +39,9 @@ func GetSrv(ctx context.Context, deps *deps.Deps) (*http.Server, error) {
}
api.Routes(mx.PathPrefix("/api").Subrouter(), deps)
basePath := basePath
var static fs.FS = static
if webDev {
basePath = "cmd/lotus-provider/web/static"
static = os.DirFS(basePath)
static = os.DirFS("./cmd/lotus-provider/web")
}
mx.NotFoundHandler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {