fix system controller not initialized
Some checks failed
Release and Deploy / build (push) Successful in 1m58s
Release and Deploy / deploy (push) Failing after 1m19s

This commit is contained in:
Fran Jurmanović
2025-07-31 18:13:43 +02:00
parent e259f2235a
commit 45d9681203
4 changed files with 11 additions and 32 deletions

View File

@@ -20,7 +20,12 @@ func InitializeControllers(c *dig.Container) {
logging.Panic("unable to initialize auth middleware")
}
err := c.Invoke(NewServiceControlController)
err := c.Invoke(NewSystemController)
if err != nil {
logging.Panic("unable to initialize system controller")
}
err = c.Invoke(NewServiceControlController)
if err != nil {
logging.Panic("unable to initialize service control controller")
}

View File

@@ -2,6 +2,7 @@ package controller
import (
"acc-server-manager/local/utl/common"
"acc-server-manager/local/utl/configs"
"github.com/gofiber/fiber/v2"
)
@@ -34,5 +35,5 @@ func NewSystemController(routeGroups *common.RouteGroups) *SystemController {
// @Success 200 {array} string
// @Router /v1/service-control [get]
func (ac *SystemController) getFirst(c *fiber.Ctx) error {
return c.SendStatus(fiber.StatusOK)
return c.SendString(configs.Version)
}

View File

@@ -8,7 +8,7 @@ import (
)
var (
Version = "0.0.1"
Version = "0.10.1"
Prefix = "v1"
Secret string
SecretCode string