package apiv1 import ( "github.com/gin-gonic/gin" "github.com/olexsmir/onasty/internal/service/usersrv" ) type APIV1 struct { userSrv usersrv.UserServicer } func NewAPIV1(us usersrv.UserServicer) *APIV1 { return &APIV1{ userSrv: us, } } func (a *APIV1) Routes(r *gin.RouterGroup) { auth := r.Group("/auth") { auth.POST("/signup", a.signUpHandler) auth.POST("/signin", a.signInHandler) auth.POST("/refresh-tokens", a.refreshTokensHandler) authorized := auth.Group("/", a.authorizedMiddleware) { authorized.POST("/logout", a.logOutHandler) } } }