add authAdminMiddlware into package auth. Need test it

This commit is contained in:
valitovgaziz
2024-08-23 07:53:10 +05:00
parent 3b045c8629
commit d10f4af8e3
6 changed files with 61 additions and 12 deletions
-9
View File
@@ -1,9 +0,0 @@
package admin
import "net/http"
func AuthAdminMiddleware(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusUnauthorized)
})
}
+1 -1
View File
@@ -24,4 +24,4 @@ func GetAllUser(w http.ResponseWriter, r *http.Request) {
w.Write([]byte(jsData))
}
}