16 lines
456 B
Go
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))
|
|
}
|