bustikiller cbcb7b70e3
All checks were successful
Check usage of free licenses / check-licenses (push) Successful in 56s
Run unit tests / unit_tests (push) Successful in 2m28s
Build Nginx-based docker image / build-static-assets (push) Successful in 22m36s
Merge pull request 'Define CUD endpoints for the Groups model' (#173) from groups-endpoints into main
Reviewed-on: #173
2024-12-08 10:52:59 +00:00

38 lines
1.2 KiB
Ruby

# Copyright (C) 2024 Manuel Bustillo
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'
get '/users/confirmation', to: 'users/confirmations#show', as: :confirmation
end
resources :groups, only: %i[index create update destroy]
resources :guests, only: %i[index create update destroy] do
post :bulk_update, on: :collection
end
resources :expenses, only: %i[index update] do
get :summary, on: :collection
end
resources :tables_arrangements, only: %i[index show]
root to: redirect("/%{slug}")
end
end