make the "raw" handlers a bit more consistent

also, todo: think about deleting them
This commit is contained in:
sentriz
2020-04-25 03:17:50 +01:00
parent 56a39126ec
commit 295bf5677f
3 changed files with 9 additions and 5 deletions

View File

@@ -18,9 +18,9 @@ import (
"github.com/oxtoacart/bpool"
"github.com/wader/gormstore"
"go.senan.xyz/gonic/server/db"
"go.senan.xyz/gonic/server/assets"
"go.senan.xyz/gonic/server/ctrlbase"
"go.senan.xyz/gonic/server/db"
"go.senan.xyz/gonic/version"
)
@@ -146,6 +146,7 @@ type Response struct {
}
type handlerAdmin func(r *http.Request) *Response
type handlerAdminRaw func(w http.ResponseWriter, r *http.Request)
//nolint:gocognit
func (c *Controller) H(h handlerAdmin) http.Handler {
@@ -212,6 +213,10 @@ func (c *Controller) H(h handlerAdmin) http.Handler {
})
}
func (c *Controller) HR(h handlerAdminRaw) http.Handler {
return http.HandlerFunc(h)
}
// ## begin utilities
// ## begin utilities
// ## begin utilities