mirror of
https://github.com/SamyRai/turash.git
synced 2025-12-26 23:01:33 +00:00
26 lines
663 B
Go
26 lines
663 B
Go
package routes
|
|
|
|
import (
|
|
"bugulma/backend/internal/handler"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
// RegisterAuthRoutes registers all authentication-related routes
|
|
func RegisterAuthRoutes(router *gin.RouterGroup, authHandler *handler.AuthHandler) {
|
|
auth := router.Group("/auth")
|
|
{
|
|
auth.POST("/login", authHandler.Login)
|
|
auth.POST("/register", authHandler.Register)
|
|
auth.GET("/me", authHandler.Me)
|
|
}
|
|
}
|
|
|
|
// RegisterUserRoutes registers user-related routes
|
|
func RegisterUserRoutes(protected *gin.RouterGroup, orgHandler *handler.OrganizationHandler) {
|
|
users := protected.Group("/users")
|
|
{
|
|
users.GET("/me/organizations", orgHandler.GetUserOrganizations)
|
|
}
|
|
}
|