initial version with fiber and gorm

This commit is contained in:
2023-08-15 11:18:29 -03:00
parent f9c2dcd1d5
commit a47d9727ad
8 changed files with 172 additions and 2 deletions
+1
View File
@@ -5,4 +5,5 @@ import "github.com/gofiber/fiber/v2"
func Setup(app *fiber.App) {
app.Get("/", GetVersion)
}
+5 -1
View File
@@ -1,6 +1,8 @@
package routes
import (
"api/globals"
"github.com/gofiber/fiber/v2"
)
@@ -8,10 +10,12 @@ func GetVersion(c *fiber.Ctx) error {
type Version struct {
Version string `json:"version"`
Release string `json:"release"`
}
v := Version{
Version: "1.0.0",
Version: globals.API_VERSION,
Release: globals.API_RELEASE,
}
return c.JSON(v)