Skip to content
This repository has been archived by the owner on May 30, 2022. It is now read-only.

Commit

Permalink
Use 201 return code when catalog is created
Browse files Browse the repository at this point in the history
  • Loading branch information
arbulu89 committed Oct 29, 2021
1 parent d190d7d commit e6fc429
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions runner/ansible/roles/post-metadata/tasks/post.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
method: POST
body_format: json
body: '{{ metadata["checks"] }}'
status_code: [201]
return_content: true
register: record

Expand Down
2 changes: 1 addition & 1 deletion web/checks_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func ApiCreateChecksCatalogtaHandler(s services.ChecksService) gin.HandlerFunc {
return
}

c.JSON(http.StatusOK, &r)
c.JSON(http.StatusCreated, &r)
}
}

Expand Down

0 comments on commit e6fc429

Please sign in to comment.