From 3732ba245e4c6e0c8ce00cd6330c9f29f5190f5f Mon Sep 17 00:00:00 2001 From: Antonio De Lucreziis Date: Sat, 5 Mar 2022 18:22:20 +0100 Subject: [PATCH] Server: Added some comments --- server/auth/auth.go | 1 + 1 file changed, 1 insertion(+) diff --git a/server/auth/auth.go b/server/auth/auth.go index 829f8f6..561a461 100644 --- a/server/auth/auth.go +++ b/server/auth/auth.go @@ -90,6 +90,7 @@ func (auth *AuthService) Logout(w http.ResponseWriter) { httputil.WriteJSON(w, "ok") } +// Middleware checks if the user is logged or not and if it has all fo the permissions set in "config.WithPermissions" func (auth *AuthService) Middleware(config *AuthMiddlewareConfig) func(http.Handler) http.Handler { return func(next http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {