46 lines
1.5 KiB
Ruby
Raw Permalink Normal View History

2024-10-27 21:42:45 +00:00
# Copyright (C) 2024 Manuel Bustillo
2024-07-11 18:42:31 +02:00
Rails.application.routes.draw do
mount LetterOpenerWeb::Engine, at: "/letter_opener" if Rails.env.development?
get 'token' => 'tokens#show', as: :token
get 'up' => 'rails/health#show', as: :rails_health_check
resources :captcha, only: :create do
get 'v2/media', to: 'captcha#media', on: :collection, as: :media
end
mount Rswag::Ui::Engine => '/api-docs'
mount Rswag::Api::Engine => '/api-docs'
scope ":slug", constraints: { slug: Wedding::SLUG_REGEX } do
devise_for :users, skip: [:registration, :session, :confirmation]
devise_scope :user do
post 'users', to: 'users/registrations#create'
post '/users/sign_in', to: 'users/sessions#create'
delete '/users/sign_out', to: 'users/sessions#destroy'
2024-11-30 18:46:25 +01:00
get '/users/confirmation', to: 'users/confirmations#show', as: :confirmation
end
resources :groups, only: %i[index create update destroy] do
post 'affinities/reset', to: 'affinities#reset', on: :collection
resources :affinities, only: %i[index] do
put :bulk_update, on: :collection
get :default, on: :collection
end
end
resources :guests, only: %i[index create update destroy] do
post :bulk_update, on: :collection
end
resources :expenses, only: %i[index create update destroy] do
get :summary, on: :collection
end
resources :tables_arrangements, only: %i[index show]
resources :summary, only: :index
2024-12-07 19:07:06 +01:00
root to: redirect("/%{slug}")
end
2024-07-11 18:42:31 +02:00
end