about summary refs log tree commit diff
path: root/config
diff options
context:
space:
mode:
authorsternenseemann <git@lukasepple.de>2020-04-20 14:03:03 +0200
committerGitHub <noreply@github.com>2020-04-20 14:03:03 +0200
commit679980f77c0e869d2eebbf64c18faabd8a523a13 (patch)
treec160b40a94b74c16c6c68d9ff2c7db39ae35596b /config
parent29f5353f8b7af331d6dddea4ee1888913361a545 (diff)
Allow users to delete their header and avatar (#13234)
This is achieved by sending a DELETE request to
/settings/profile/pictures/{avatar,header} via a link that is part of
the upload form's hint of the respective picture.
Diffstat (limited to 'config')
-rw-r--r--config/routes.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/config/routes.rb b/config/routes.rb
index 49ab851e2..fa6639138 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -100,7 +100,9 @@ Rails.application.routes.draw do
   get '/settings', to: redirect('/settings/profile')
 
   namespace :settings do
-    resource :profile, only: [:show, :update]
+    resource :profile, only: [:show, :update] do
+      resources :pictures, only: :destroy
+    end
 
     get :preferences, to: redirect('/settings/preferences/appearance')