forked from Gitlink/forgeplus
修复:owners放在后面以防覆盖
This commit is contained in:
parent
7b8107b95e
commit
20cb2c8eb8
|
|
@ -146,6 +146,7 @@ Rails.application.routes.draw do
|
||||||
post '/blockchain/issue/get_token_num', to: 'users#blockchain_get_issue_token_num'
|
post '/blockchain/issue/get_token_num', to: 'users#blockchain_get_issue_token_num'
|
||||||
get '/projects/blockchain/get_unclosed_issue_list', to: 'users#blockchain_get_unclosed_issue_list'
|
get '/projects/blockchain/get_unclosed_issue_list', to: 'users#blockchain_get_unclosed_issue_list'
|
||||||
|
|
||||||
|
# resources :owners 路由必须放在 /:owner/:repo 通配符路由之前,以避免被误匹配
|
||||||
resources :owners, only: [:index, :show]
|
resources :owners, only: [:index, :show]
|
||||||
|
|
||||||
scope module: :organizations do
|
scope module: :organizations do
|
||||||
|
|
@ -531,7 +532,10 @@ Rails.application.routes.draw do
|
||||||
end
|
end
|
||||||
|
|
||||||
# Project Area START
|
# Project Area START
|
||||||
scope "/:owner/:repo",constraints: { repo: /[^\/]+/ } do
|
scope "/:owner/:repo", constraints: lambda { |req|
|
||||||
|
# 避免匹配 'api/owners' 这样的路径
|
||||||
|
req.path !~ %r{^/api/owners}
|
||||||
|
}, repo: /[^\/]+/ do
|
||||||
scope do
|
scope do
|
||||||
get(
|
get(
|
||||||
'/activity',
|
'/activity',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue