add authAdminMiddlware into package auth. Need test it
This commit is contained in:
@@ -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)
|
||||
})
|
||||
}
|
||||
@@ -24,4 +24,4 @@ func GetAllUser(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
w.Write([]byte(jsData))
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user