diff options
author | Phil Hughes <me@iamphill.com> | 2017-06-07 12:26:48 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-06-07 12:26:48 +0300 |
commit | 563ea34692a18d82d9d1bc481002f19b8a407508 (patch) | |
tree | 6aa991974f140b42534e06abe18e4e5287afc49a /config/routes | |
parent | 7adddf49965a1808e7a3a0d1a70b08172c74a762 (diff) | |
parent | 2e311d9d1aac58bbd9c7d6c97c7cbcccf2715347 (diff) |
Merge branch '12910-snippets-description' into 'master'
Support descriptions for snippets
Closes #31894
See merge request !11071
Diffstat (limited to 'config/routes')
-rw-r--r-- | config/routes/snippets.rb | 3 | ||||
-rw-r--r-- | config/routes/uploads.rb | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/config/routes/snippets.rb b/config/routes/snippets.rb index dae83734fe6..0a4ebac3ca3 100644 --- a/config/routes/snippets.rb +++ b/config/routes/snippets.rb @@ -2,6 +2,9 @@ resources :snippets, concerns: :awardable do member do get :raw post :mark_as_spam + end + + collection do post :preview_markdown end diff --git a/config/routes/uploads.rb b/config/routes/uploads.rb index b315186b178..ae8747d766d 100644 --- a/config/routes/uploads.rb +++ b/config/routes/uploads.rb @@ -9,6 +9,11 @@ scope path: :uploads do to: 'uploads#show', constraints: { model: /personal_snippet/, id: /\d+/, filename: /[^\/]+/ } + # show temporary uploads + get 'temp/:secret/:filename', + to: 'uploads#show', + constraints: { filename: /[^\/]+/ } + # Appearance get ":model/:mounted_as/:id/:filename", to: "uploads#show", @@ -20,7 +25,7 @@ scope path: :uploads do constraints: { namespace_id: /[a-zA-Z.0-9_\-]+/, project_id: /[a-zA-Z.0-9_\-]+/, filename: /[^\/]+/ } # create uploads for models, snippets (notes) available for now - post ':model/:id/', + post ':model', to: 'uploads#create', constraints: { model: /personal_snippet/, id: /\d+/ }, as: 'upload' |