module API
# Projects API
class Repositories < Grape::API
before { authenticate! }
before { authorize! :download_code, user_project }
resource :projects do
...
....
# GET /projects/:id/repository/test
get ':id/repository/test' do
content...
end
end
end
end
上面的代码中,我想在第一个 before { authenticate! } 中 except 掉 tree,即调 test api 的时候不走 authenticate!,请问语法上该怎么写? 感谢!