From 39a851b74bfebd0ff27254b8ec1b27aaf441f81e Mon Sep 17 00:00:00 2001 From: yystopf Date: Fri, 7 Apr 2023 10:35:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/routes.rb | 4 ++-- config/routes/api.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/routes.rb b/config/routes.rb index 2206f2846..7e69c2e38 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -451,7 +451,7 @@ Rails.application.routes.draw do namespace :traces do resources :trace_users, only: [:create] - scope "/:owner/:repo", constraints: { repo: /[^\/|.json]+/ } do + scope "/:owner/:repo", constraints: { repo: /[^\/]+/ } do resource :projects, path: '/', only: [:index] do member do post :tasks @@ -464,7 +464,7 @@ Rails.application.routes.draw do end # Project Area START - scope "/:owner/:repo",constraints: { repo: /[^\/|.json]+/ } do + scope "/:owner/:repo",constraints: { repo: /[^\/]+/ } do scope do get( '/activity', diff --git a/config/routes/api.rb b/config/routes/api.rb index ccc80abe3..f39fa76c5 100644 --- a/config/routes/api.rb +++ b/config/routes/api.rb @@ -18,7 +18,7 @@ defaults format: :json do resources :feedbacks, only: [:create] end - scope ':repo', constraints: { repo: /[^\/|.json]+/ } do + scope ':repo', constraints: { repo: /[^\/]+/ } do # projects resource :projects, path: '/', only: [:show, :update, :edit, :destroy] do collection do