Move unsubscribes to root

Otherwise conflits will occur while merging with CE
parent 725891d8
......@@ -2,7 +2,7 @@ module Emails
module AdminNotification
def send_admin_notification(user_id, subject, body)
email = recipient(user_id)
@unsubscribe_url = public_unsubscribe_url(email: email)
@unsubscribe_url = unsubscribe_url(email: email)
@body = body
mail to: email, subject: subject
end
......
%h3.page-title Unsubscribe from Admin notifications
%hr
= form_tag public_unsubscribe_path(@email) do
= form_tag unsubscribe_path(@email) do
%p
Yes, I want to unsubscribe
%strong= @email
......
......@@ -52,8 +52,6 @@ Gitlab::Application.routes.draw do
#
namespace :public do
resources :projects, only: [:index]
get 'unsubscribes/:email', to: 'unsubscribes#show', as: :unsubscribe
post 'unsubscribes/:email', to: 'unsubscribes#create'
root to: "projects#index"
end
......@@ -176,6 +174,8 @@ Gitlab::Application.routes.draw do
end
end
get 'unsubscribes/:email', to: 'unsubscribes#show', as: :unsubscribe
post 'unsubscribes/:email', to: 'unsubscribes#create'
resources :projects, constraints: { id: /[^\/]+/ }, only: [:new, :create]
devise_for :users, controllers: { omniauth_callbacks: :omniauth_callbacks, registrations: :registrations , passwords: :passwords, sessions: :sessions }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment