2026-05-02 13:02:38 +08:00

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)
}