diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-01-26 15:02:59 -0800 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-01-26 15:02:59 -0800 |
commit | e07da5989f5ae14dddc130b80210342ca776e6d2 (patch) | |
tree | 93bdd11442348eabae43ae8024b56cd74a4be824 /config | |
parent | 59b08942aa3de480899f32f1a6f2f948329ae3fc (diff) | |
download | gitlab-ce-e07da5989f5ae14dddc130b80210342ca776e6d2.tar.gz |
SEtup new routes for creating and changing repository files
Diffstat (limited to 'config')
-rw-r--r-- | config/routes.rb | 13 |
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] |