make the "raw" handlers a bit more consistent
also, todo: think about deleting them
This commit is contained in:
@@ -82,6 +82,7 @@ func writeResp(w http.ResponseWriter, r *http.Request, resp *spec.Response) erro
|
||||
}
|
||||
|
||||
type handlerSubsonic func(r *http.Request) *spec.Response
|
||||
type handlerSubsonicRaw func(w http.ResponseWriter, r *http.Request) *spec.Response
|
||||
|
||||
func (c *Controller) H(h handlerSubsonic) http.Handler {
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
@@ -96,8 +97,6 @@ func (c *Controller) H(h handlerSubsonic) http.Handler {
|
||||
})
|
||||
}
|
||||
|
||||
type handlerSubsonicRaw func(w http.ResponseWriter, r *http.Request) *spec.Response
|
||||
|
||||
func (c *Controller) HR(h handlerSubsonicRaw) http.Handler {
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
response := h(w, r)
|
||||
|
||||
Reference in New Issue
Block a user