mirror of https://github.com/perkeep/perkeep.git
publish: don't retain a blobserver.Loader, just a FindHandlerByTyper
Change-Id: I37d5873ce4c30f67841f31fa744afaf80b24d4b3
This commit is contained in:
parent
d80cad8e2d
commit
5998fecc22
|
@ -51,7 +51,7 @@ type PublishHandler struct {
|
|||
|
||||
JSFiles, CSSFiles []string
|
||||
|
||||
bsLoader blobserver.Loader
|
||||
handlerFinder blobserver.FindHandlerByTyper
|
||||
staticHandler http.Handler
|
||||
}
|
||||
|
||||
|
@ -61,7 +61,7 @@ func init() {
|
|||
|
||||
func newPublishFromConfig(ld blobserver.Loader, conf jsonconfig.Obj) (h http.Handler, err error) {
|
||||
ph := &PublishHandler{
|
||||
bsLoader: ld,
|
||||
handlerFinder: ld,
|
||||
}
|
||||
ph.RootName = conf.RequiredString("rootName")
|
||||
ph.JSFiles = conf.OptionalList("js")
|
||||
|
@ -178,7 +178,7 @@ func (ph *PublishHandler) serveDiscovery(rw http.ResponseWriter, req *http.Reque
|
|||
})
|
||||
return
|
||||
}
|
||||
_, handler, err := ph.bsLoader.FindHandlerByType("ui")
|
||||
_, handler, err := ph.handlerFinder.FindHandlerByType("ui")
|
||||
if err != nil {
|
||||
discoveryHelper(rw, req, map[string]interface{}{
|
||||
"error": "no admin handler running",
|
||||
|
|
Loading…
Reference in New Issue