【发布时间】:2017-06-10 13:01:36
【问题描述】:
我有一个无法解决的奇怪问题,我收到了 404 响应正文
<h1>Not Found</h1>
当部署在 heroku 上时,从我的 sinatra API 来看,我有一百条路线,所有路线都可以正常工作,除了这条。这个正在开发中......
namespace '/departments' do
namespace '/department' do
get '/single' do
begin
dept = API::Department.find(params['department_id'])
status 200
body json BODY: {
department: dept.dept_details
}
rescue => error
puts error
status 403
body json DETAIL: error
end
end
end
end
【问题讨论】: