updates
This commit is contained in:
3
main.go
3
main.go
@@ -121,10 +121,11 @@ func main() {
|
||||
public := router.Group("/api")
|
||||
public.POST("/login", controllers.Login)
|
||||
|
||||
// TODO - this should be an authenticated route
|
||||
// API calls that only an administrator can make
|
||||
adminOnly := router.Group("/api/admin")
|
||||
adminOnly.Use(middlewares.JwtAuthAdminMiddleware())
|
||||
adminOnly.POST("/register", controllers.Register)
|
||||
adminOnly.GET("/roles", controllers.GetRoles)
|
||||
|
||||
// Get secrets
|
||||
protected := router.Group("/api/secret")
|
||||
|
Reference in New Issue
Block a user