15 lines
428 B
Go
15 lines
428 B
Go
package auth
|
|
|
|
import "github.com/gin-gonic/gin"
|
|
|
|
func RegisterRoutes(api *gin.RouterGroup, protected *gin.RouterGroup, h *Handler) {
|
|
authGroup := api.Group("/auth")
|
|
authGroup.POST("/login", h.Login)
|
|
authGroup.POST("/logout", h.Logout)
|
|
authGroup.POST("/refresh", h.Refresh)
|
|
|
|
authGroupProtected := protected.Group("/auth")
|
|
authGroupProtected.GET("/me", h.Me)
|
|
authGroupProtected.POST("/change-password", h.ChangePassword)
|
|
}
|