fix
This commit is contained in:
@@ -12,7 +12,7 @@ import (
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
func NewRouter(auth *handlers.AuthHandler, oauth *handlers.OAuthHandler, consents *handlers.ConsentHandler, svc *services.Service, repo *repositories.OAuthRepository, limiter *services.RateLimiter) *gin.Engine {
|
||||
func NewRouter(auth *handlers.AuthHandler, oauth *handlers.OAuthHandler, consents *handlers.ConsentHandler, positions *handlers.PositionsHandler, svc *services.Service, repo *repositories.OAuthRepository, limiter *services.RateLimiter) *gin.Engine {
|
||||
r := gin.Default()
|
||||
r.Use(errorMiddleware())
|
||||
|
||||
@@ -39,6 +39,11 @@ func NewRouter(auth *handlers.AuthHandler, oauth *handlers.OAuthHandler, consent
|
||||
me.DELETE("", authMiddleware(svc, repo, "profile:delete"), auth.DeleteProfile)
|
||||
me.GET("/consents", authMiddleware(svc, repo, "profile:consent:read"), consents.GetUserConsents)
|
||||
me.DELETE("/consent/:clientId", authMiddleware(svc, repo, "profile:consent:delete"), consents.RevokeAppAccess)
|
||||
me.GET("/positions", authMiddleware(svc, repo, "profile:read"), positions.GetMyPositions)
|
||||
|
||||
admin := api.Group("/admin")
|
||||
admin.GET("/positions", authMiddleware(svc, repo), positions.ListPositions)
|
||||
admin.POST("/positions", authMiddleware(svc, repo), positions.UpsertPosition)
|
||||
}
|
||||
|
||||
return r
|
||||
|
||||
Reference in New Issue
Block a user