22 lines
526 B
Go
22 lines
526 B
Go
package routes
|
|
|
|
import (
|
|
"log/slog"
|
|
"orbits-server/internal/server/api/assets"
|
|
"orbits-server/internal/server/bootstrap"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
func RegisterApiRoutes(api *gin.RouterGroup, env bootstrap.Environment) {
|
|
api.GET("/version", func(c *gin.Context) {
|
|
slog.Debug("received request for the version endpoint")
|
|
assets.BasicResponse(c, env.Version)
|
|
})
|
|
|
|
api.GET("/codename", func(c *gin.Context) {
|
|
slog.Debug("received request for the codename endpoint")
|
|
assets.BasicResponse(c, env.Codename)
|
|
})
|
|
}
|