aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/controllers/api_account.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/controllers/api_account.go b/app/controllers/api_account.go
index 259a7d4..8ef18ce 100644
--- a/app/controllers/api_account.go
+++ b/app/controllers/api_account.go
@@ -125,6 +125,13 @@ func (h *APIAccountHandler) HandlePut(c echo.Context) error {
125 } 125 }
126 } 126 }
127 127
128 if in.Deleted != nil && a.Deleted == nil {
129 return &echo.HTTPError{
130 Code: http.StatusBadRequest,
131 Message: "Use the DELETE method to delete a record",
132 }
133 }
134
128 a.AccountNumber = in.AccountNumber 135 a.AccountNumber = in.AccountNumber
129 a.Name = in.Name 136 a.Name = in.Name
130 a.ConsoleSessionDuration = in.ConsoleSessionDuration 137 a.ConsoleSessionDuration = in.ConsoleSessionDuration