use http consts for request methods
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
7f9f86c411
commit
f9ccd2c6ea
33 changed files with 211 additions and 211 deletions
|
@ -33,12 +33,12 @@ func blobDispatcher(ctx *Context, r *http.Request) http.Handler {
|
|||
}
|
||||
|
||||
mhandler := handlers.MethodHandler{
|
||||
"GET": http.HandlerFunc(blobHandler.GetBlob),
|
||||
"HEAD": http.HandlerFunc(blobHandler.GetBlob),
|
||||
http.MethodGet: http.HandlerFunc(blobHandler.GetBlob),
|
||||
http.MethodHead: http.HandlerFunc(blobHandler.GetBlob),
|
||||
}
|
||||
|
||||
if !ctx.readOnly {
|
||||
mhandler["DELETE"] = http.HandlerFunc(blobHandler.DeleteBlob)
|
||||
mhandler[http.MethodDelete] = http.HandlerFunc(blobHandler.DeleteBlob)
|
||||
}
|
||||
|
||||
return mhandler
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue