(next http.Handler)
| 321 | } |
| 322 | |
| 323 | func webAssetsHandler(next http.Handler) http.Handler { |
| 324 | mux := http.NewServeMux() |
| 325 | mux.Handle("/dashboard/", http.StripPrefix("/dashboard/", static.Handler{ |
| 326 | Assets: dashboard.Files, |
| 327 | Default: "index.html", |
| 328 | })) |
| 329 | mux.Handle("/", next) |
| 330 | |
| 331 | return mux |
| 332 | } |
| 333 | |
| 334 | func (a *API) leaderSignHandler(f func(context.Context, *legacy.Block) ([]byte, error)) func(context.Context, *legacy.Block) ([]byte, error) { |
| 335 | return func(ctx context.Context, b *legacy.Block) ([]byte, error) { |