wishli-api/api/routes/auth.go
2025-03-23 20:05:51 +03:00

16 lines
456 B
Go

package routes
import (
"wish-list-api/api/handlers"
"wish-list-api/pkg/auth"
"github.com/gofiber/fiber/v2"
)
func AuthRouter(app fiber.Router, service auth.Service, telegramService auth.TelegramAuthService) {
app.Post("/auth/login", handlers.Login(service))
app.Post("/auth/register", handlers.Register(service))
app.Post("/auth/refresh", handlers.RefreshToken(service))
app.Post("/auth/telegram", handlers.LoginWithTelegram(telegramService))
}