mirror of
https://github.com/portainer/portainer.git
synced 2025-07-23 15:29:42 +02:00
api: use response code 200 (#604)
This commit is contained in:
parent
a5d857d5e7
commit
3800249921
2 changed files with 3 additions and 3 deletions
|
@ -50,7 +50,7 @@ type accessTokenResponse struct {
|
|||
// @produce json
|
||||
// @param id path int true "User identifier"
|
||||
// @param body body userAccessTokenCreatePayload true "details"
|
||||
// @success 200 {object} accessTokenResponse "Created"
|
||||
// @success 200 {object} accessTokenResponse "Success"
|
||||
// @failure 400 "Invalid request"
|
||||
// @failure 401 "Unauthorized"
|
||||
// @failure 403 "Permission denied"
|
||||
|
@ -115,7 +115,7 @@ func (handler *Handler) userCreateAccessToken(w http.ResponseWriter, r *http.Req
|
|||
return httperror.InternalServerError("Internal Server Error", err)
|
||||
}
|
||||
|
||||
return response.JSONWithStatus(w, accessTokenResponse{rawAPIKey, *apiKey}, http.StatusCreated)
|
||||
return response.JSONWithStatus(w, accessTokenResponse{rawAPIKey, *apiKey}, http.StatusOK)
|
||||
}
|
||||
|
||||
func (handler *Handler) usesInternalAuthentication(userid portainer.UserID) (bool, error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue