lot of new functionalities
This commit is contained in:
12
servers/web/protected_api_routes.go
Normal file
12
servers/web/protected_api_routes.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package web
|
||||
|
||||
import (
|
||||
"github.com/gorilla/mux"
|
||||
)
|
||||
|
||||
func (ws *WebServer) setupProtectedAPIRoutes(r *mux.Router) {
|
||||
api_router := r.PathPrefix("/api").Subrouter()
|
||||
protected_api_router := api_router.PathPrefix("/protected").Subrouter()
|
||||
protected_api_router.Use(ws.protectedAPIHandler.ApiKeyMiddleware)
|
||||
protected_api_router.HandleFunc("/users", ws.protectedAPIHandler.UsersHTTPHandler())
|
||||
}
|
||||
Reference in New Issue
Block a user