Updating versions and changing log system
Some checks failed
continuous-integration/drone Build encountered an error

This commit is contained in:
2023-02-20 23:54:02 +01:00
parent 16c57cc424
commit c4a97644ed
14 changed files with 324 additions and 143 deletions

View File

@@ -25,13 +25,19 @@ import (
func (h Handlers) AccountUpdateFields(c *fiber.Ctx) error {
accountID := c.Params("accountID")
h.Log.Context = []interface{}{
"accountID", accountID,
}
_, uuidErr := uuid.Parse(accountID)
if uuidErr != nil {
h.Log.Debug("client supplied invalid uuid format")
return c.Status(400).JSON([]ResJSONError{{Error: "Invalid uuid format"}})
}
authErr := h.RequireAdminRole(c)
if authErr != nil {
h.Log.Debug("client does not have admin role")
return c.Status(403).JSON([]ResJSONError{{Error: authErr.Error()}})
}