status updates
This commit is contained in:
@@ -69,7 +69,7 @@ func (ac *ApiController) getStatus(c *fiber.Ctx) error {
|
||||
if err != nil {
|
||||
return c.Status(400).SendString(strings.ReplaceAll(err.Error(), "\x00", ""))
|
||||
}
|
||||
return c.SendString(apiModel)
|
||||
return c.SendString(string(apiModel))
|
||||
}
|
||||
|
||||
// startServer starts service
|
||||
|
||||
@@ -58,11 +58,7 @@ func (ac *ConfigController) updateConfig(c *fiber.Ctx) error {
|
||||
return c.Status(400).SendString(err.Error())
|
||||
}
|
||||
if restart {
|
||||
serviceName, err := ac.apiService.GetServiceName(c)
|
||||
if err != nil {
|
||||
return c.Status(400).JSON(fiber.Map{"error": "Unable to restart service"})
|
||||
}
|
||||
ac.apiService.RestartServer(serviceName)
|
||||
ac.apiService.ApiRestartServer(c)
|
||||
}
|
||||
|
||||
return c.JSON(ConfigModel)
|
||||
|
||||
Reference in New Issue
Block a user