Files
grecia/config/routes/management.rb
decabeza a851048d56 Allow users to remove their support on investments
Note we don't cast negative votes when users remove their support. That
way we provide compatibility for institutions who have implemented real
negative votes (in case there are / will be any), and we also keep the
database meaningful: it's not that users downvoted something; they
simply removed their upvote.

Co-Authored-By: Javi Martín <javim@elretirao.net>
Co-Authored-By: Julian Nicolas Herrero <microweb10@gmail.com>
2021-06-14 14:46:54 +02:00

48 lines
1.2 KiB
Ruby

namespace :management do
root to: "dashboard#index"
resources :document_verifications, only: [:index, :new, :create] do
post :check, on: :collection
end
resources :email_verifications, only: [:new, :create]
resources :user_invites, only: [:new, :create]
resources :users, only: [:new, :create] do
collection do
delete :logout
delete :erase
end
end
resource :account, controller: "account", only: [:show] do
get :print_password
patch :change_password
get :reset_password
get :edit_password_email
get :edit_password_manually
end
resource :session, only: [:create, :destroy]
get "sign_in", to: "sessions#create", as: :sign_in
resources :proposals, only: [:index, :new, :create, :show] do
post :vote, on: :member
get :print, on: :collection
end
resources :budgets, only: :index do
collection do
get :create_investments
get :support_investments
get :print_investments
end
resources :investments, only: [:index, :new, :create, :show, :destroy], controller: "budgets/investments" do
get :print, on: :collection
resources :votes, controller: "budgets/investments/votes", only: [:create, :destroy]
end
end
end