mirror of
https://github.com/SamyRai/turash.git
synced 2025-12-26 23:01:33 +00:00
25 lines
610 B
Go
25 lines
610 B
Go
package routes
|
|
|
|
import (
|
|
"bugulma/backend/internal/handler"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
// RegisterPublicTransportRoutes registers routes for public transport API
|
|
func RegisterPublicTransportRoutes(router *gin.RouterGroup, h *handler.PublicTransportHandler) {
|
|
if h == nil {
|
|
return
|
|
}
|
|
|
|
group := router.Group("/public-transport")
|
|
{
|
|
group.GET("/metadata", h.GetMetadata)
|
|
group.GET("/stops", h.ListStops)
|
|
group.GET("/stops/search", h.SearchStops)
|
|
group.GET("/stops/:id", h.GetStop)
|
|
group.GET("/stops/:id/next-departures", h.GetNextDepartures)
|
|
group.GET("/gtfs/:filename", h.GetGTFSFile)
|
|
}
|
|
}
|