Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-01-27 02:02:59 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-01-27 02:02:59 +0300
commite07da5989f5ae14dddc130b80210342ca776e6d2 (patch)
tree93bdd11442348eabae43ae8024b56cd74a4be824 /config
parent59b08942aa3de480899f32f1a6f2f948329ae3fc (diff)
SEtup new routes for creating and changing repository files
Diffstat (limited to 'config')
-rw-r--r--config/routes.rb13
1 files changed, 8 insertions, 5 deletions
diff --git a/config/routes.rb b/config/routes.rb
index 8c3eef23260..f29b620e079 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -211,17 +211,20 @@ Gitlab::Application.routes.draw do
end
scope module: :projects do
+ # Blob routes:
+ get '/new/:id', to: 'blob#new', constraints: {id: /.+/}, as: 'new_blob'
+ post '/create/:id', to: 'blob#create', constraints: {id: /.+/}, as: 'create_blob'
+ get '/edit/:id', to: 'blob#edit', constraints: {id: /.+/}, as: 'edit_blob'
+ put '/update/:id', to: 'blob#update', constraints: {id: /.+/}, as: 'update_blob'
+ post '/preview/:id', to: 'blob#preview', constraints: {id: /.+/}, as: 'preview_blob'
+
resources :blob, only: [:show, :destroy], constraints: { id: /.+/, format: false } do
get :diff, on: :member
end
+
resources :raw, only: [:show], constraints: {id: /.+/}
resources :tree, only: [:show], constraints: {id: /.+/, format: /(html|js)/ }
- resources :edit_tree, only: [:show, :update], constraints: { id: /.+/ }, path: 'edit' do
- # Cannot be GET to differentiate from GET paths that end in preview.
- post :preview, on: :member
- end
resource :avatar, only: [:show, :destroy]
- resources :new_tree, only: [:show, :update], constraints: {id: /.+/}, path: 'new'
resources :commit, only: [:show], constraints: {id: /[[:alnum:]]{6,40}/}
resources :commits, only: [:show], constraints: {id: /(?:[^.]|\.(?!atom$))+/, format: /atom/}
resources :compare, only: [:index, :create]