Commit 54a562ca authored by Lin Jen-Shin's avatar Lin Jen-Shin

Explicitly set the status to be 204 for DELETE

We updated grape from 0.19.0 to 0.19.2, the diff is:

https://github.com/ruby-grape/grape/compare/v0.19.0...v0.19.2

This was introduced in grape 0.19.1:

* [#1550](https://github.com/ruby-grape/grape/pull/1550): Use 200 as default status for deletes that reply with content - [@jthornec](https://github.com/jthornec).

So now we need to be explicit about the status.
parent dfef98a8
......@@ -38,6 +38,7 @@ module API
ldap_group_link = group.ldap_group_links.find_by(cn: params[:cn])
if ldap_group_link
ldap_group_link.destroy
status 204
else
render_api_error!('Linked LDAP group not found', 404)
end
......@@ -55,6 +56,7 @@ module API
ldap_group_link = group.ldap_group_links.find_by(cn: params[:cn], provider: params[:provider])
if ldap_group_link
ldap_group_link.destroy
status 204
else
render_api_error!('Linked LDAP group not found', 404)
end
......
......@@ -70,6 +70,7 @@ module API
not_found!('Push Rule') unless push_rule
push_rule.destroy
status 204
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment