API: extracted helper method to provide 400 bad request error with description
Extracted a method for 400 error (Bad request) and adjusted code accordingly. The name of the missing attribute is used to show which one was missing from the request. It is used to give an appropriate message in the json response.
显示
- lib/api/helpers.rb 6 个添加, 0 个删除lib/api/helpers.rb
- lib/api/merge_requests.rb 3 个添加, 3 个删除lib/api/merge_requests.rb
- lib/api/milestones.rb 1 个添加, 1 个删除lib/api/milestones.rb
- lib/api/notes.rb 1 个添加, 1 个删除lib/api/notes.rb
- lib/api/projects.rb 12 个添加, 12 个删除lib/api/projects.rb
- spec/requests/api/merge_requests_spec.rb 5 个添加, 0 个删除spec/requests/api/merge_requests_spec.rb
加载中
想要评论请 注册 或 登录