Commit 174847b4 authored by Vitali Tatarintev's avatar Vitali Tatarintev

Replace case with the guard clause

parent d60243ed
...@@ -40,14 +40,9 @@ module Projects ...@@ -40,14 +40,9 @@ module Projects
end end
def response_status(result) def response_status(result)
case result.http_status return :ok if result.success?
when 401
:unauthorized result.http_status
when 403
:forbidden
else
:ok
end
end end
def permitted_params def permitted_params
......
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