This is an automated email from the ASF dual-hosted git repository.

ocket8888 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git


The following commit(s) were added to refs/heads/master by this push:
     new 2e5c108  Fixed response code and docs for acme_accounts (#6602)
2e5c108 is described below

commit 2e5c108ea06b932ecfeb824d8684ab13a0e9fb52
Author: mattjackson220 <[email protected]>
AuthorDate: Thu Mar 3 11:58:01 2022 -0700

    Fixed response code and docs for acme_accounts (#6602)
---
 CHANGELOG.md                                        | 1 +
 docs/source/api/v3/acme_accounts.rst                | 2 +-
 docs/source/api/v4/acme_accounts.rst                | 2 +-
 traffic_ops/traffic_ops_golang/acme/acme_account.go | 2 +-
 4 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 562f00b..cd37cff 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -22,6 +22,7 @@ The format is based on [Keep a 
Changelog](http://keepachangelog.com/en/1.0.0/).
 - [#6590](https://github.com/apache/trafficcontrol/pull/6590) Python client: 
Corrected parameter name in decorator for get_parameters_by_profile_id
 - [#6368](https://github.com/apache/trafficcontrol/pull/6368) Fixed validation 
response message from `/acme_accounts`
 - [#6603](https://github.com/apache/trafficcontrol/issues/6603) Fixed users 
with "admin" "Priv Level" not having Permission to view or delete DNSSEC keys.
+- [#6370](https://github.com/apache/trafficcontrol/pull/6370) Fixed docs for 
`POST` and response code for `PUT` to `/acme_accounts` endpoint
 
 ### Removed
 - Remove traffic_portal dependencies to mitigate `npm audit` issues, 
specifically `grunt-concurrent`, `grunt-contrib-concat`, 
`grunt-contrib-cssmin`, `grunt-contrib-jsmin`, `grunt-contrib-uglify`, 
`grunt-contrib-htmlmin`, `grunt-newer`, and `grunt-wiredep`
diff --git a/docs/source/api/v3/acme_accounts.rst 
b/docs/source/api/v3/acme_accounts.rst
index 07739db..a264810 100644
--- a/docs/source/api/v3/acme_accounts.rst
+++ b/docs/source/api/v3/acme_accounts.rst
@@ -102,7 +102,7 @@ Response Structure
 .. code-block:: http
        :caption: Response Example
 
-       HTTP/1.1 200 OK
+       HTTP/1.1 201 Created
        Access-Control-Allow-Credentials: true
        Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, 
Accept, Set-Cookie, Cookie
        Access-Control-Allow-Methods: POST,GET,OPTIONS,PUT,DELETE
diff --git a/docs/source/api/v4/acme_accounts.rst 
b/docs/source/api/v4/acme_accounts.rst
index 8616a85..391f521 100644
--- a/docs/source/api/v4/acme_accounts.rst
+++ b/docs/source/api/v4/acme_accounts.rst
@@ -104,7 +104,7 @@ Response Structure
 .. code-block:: http
        :caption: Response Example
 
-       HTTP/1.1 200 OK
+       HTTP/1.1 201 Created
        Access-Control-Allow-Credentials: true
        Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, 
Accept, Set-Cookie, Cookie
        Access-Control-Allow-Methods: POST,GET,OPTIONS,PUT,DELETE
diff --git a/traffic_ops/traffic_ops_golang/acme/acme_account.go 
b/traffic_ops/traffic_ops_golang/acme/acme_account.go
index b869e16..9be98df 100644
--- a/traffic_ops/traffic_ops_golang/acme/acme_account.go
+++ b/traffic_ops/traffic_ops_golang/acme/acme_account.go
@@ -208,7 +208,7 @@ func Update(w http.ResponseWriter, r *http.Request) {
        }
 
        alerts := tc.CreateAlerts(tc.SuccessLevel, "Acme account updated")
-       api.WriteAlertsObj(w, r, http.StatusCreated, alerts, acmeAccount)
+       api.WriteAlertsObj(w, r, http.StatusOK, alerts, acmeAccount)
 
        changeLogMsg := fmt.Sprintf("ACME ACCOUNT: %s %s, ACTION: updated", 
*acmeAccount.Email, *acmeAccount.Provider)
        api.CreateChangeLogRawTx(api.ApiChange, changeLogMsg, inf.User, tx)

Reply via email to