security improvements
This commit is contained in:
@@ -59,7 +59,7 @@ func (ac *ConfigController) UpdateConfig(c *fiber.Ctx) error {
|
||||
if err != nil {
|
||||
return c.Status(400).SendString(err.Error())
|
||||
}
|
||||
logging.Info("restart", restart)
|
||||
logging.Info("restart: %v", restart)
|
||||
if restart {
|
||||
_, err := ac.apiService.ApiRestartServer(c)
|
||||
if err != nil {
|
||||
|
||||
@@ -55,6 +55,7 @@ func (c *MembershipController) Login(ctx *fiber.Ctx) error {
|
||||
return ctx.Status(fiber.StatusBadRequest).JSON(fiber.Map{"error": "Invalid request"})
|
||||
}
|
||||
|
||||
logging.Debug("Login request received")
|
||||
token, err := c.service.Login(ctx.UserContext(), req.Username, req.Password)
|
||||
if err != nil {
|
||||
return ctx.Status(fiber.StatusUnauthorized).JSON(fiber.Map{"error": err.Error()})
|
||||
|
||||
Reference in New Issue
Block a user