mirror of
https://github.com/m1k1o/neko.git
synced 2025-05-30 17:37:16 +02:00
refactor HTTP error.
This commit is contained in:
parent
d46c5d9d30
commit
4fa11e6a2a
15 changed files with 166 additions and 102 deletions
|
@ -90,7 +90,7 @@ func (h *RoomHandler) uploadMiddleware(next http.Handler) http.Handler {
|
|||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
session := auth.GetSession(r)
|
||||
if !session.IsHost() && (!session.Profile().CanHost || !h.sessions.ImplicitHosting()) {
|
||||
utils.HttpForbidden(w, "without implicit hosting, only host can upload files")
|
||||
utils.HttpForbidden(w).Msg("without implicit hosting, only host can upload files")
|
||||
} else {
|
||||
next.ServeHTTP(w, r)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue