Rails.application.routes.draw do scope 'v1' do use_doorkeeper end scope '/rails/action_mailbox', module: 'action_mailbox/ingresses' do post '/improvmx/inbound_emails' => 'improvmx/inbound_emails#create', as: :rails_improvmx_inbound_emails end namespace :v1 do jsonapi_resources :activities do jsonapi_relationships member do post :generate_alias end end jsonapi_resources :alumni_contributions jsonapi_resources :articles jsonapi_resources :article_comments jsonapi_resources :board_room_presences jsonapi_resources :study_room_presences jsonapi_resources :books do collection do get :isbn_lookup end end jsonapi_resources :declarations do jsonapi_relationships member do post :approve post :reject get :receipt get :pdf end end jsonapi_resources :groups do jsonapi_relationships member do get :export end end jsonapi_resources :mail_aliases jsonapi_resources :memberships jsonapi_resources :permissions, only: %i[index show] jsonapi_resources :photo_albums do jsonapi_relationships member do post :dropzone get :zip end end jsonapi_resources :photo_comments jsonapi_resources :photo_tags jsonapi_resources :photos, only: %i[index show destroy] jsonapi_resources :polls jsonapi_resources :room_adverts jsonapi_resources :static_pages jsonapi_resources :stored_mails, only: %i[index show destroy] do jsonapi_relationships member do post :accept post :reject end end resources :daily_verses, only: [:index] jsonapi_resources :users, only: %i[index show create update] do jsonapi_relationships collection do post :reset_password post :batch_import end member do post :activate_account post :archive post :resend_activation_mail post :generate_otp_secret post :activate_otp end end get 'users/me/nextcloud', to: 'users#nextcloud' jsonapi_resources :vacancies namespace :debit do jsonapi_resources :collections do jsonapi_relationships member do get :sepa post :finalize end end jsonapi_resources :transactions jsonapi_resources :mandates, only: %i[index show create update] end namespace :form do jsonapi_resources :closed_questions jsonapi_resources :closed_question_answers jsonapi_resources :closed_question_options jsonapi_resources :forms jsonapi_resources :responses jsonapi_resources :open_questions jsonapi_resources :open_question_answers end namespace :forum do jsonapi_resources :categories jsonapi_resources :posts jsonapi_resources :threads do jsonapi_relationships member do post :mark_read end end end end get 'coffee', to: 'coffee#index' get 'ical/activities', to: 'v1/activities#ical' require 'sidekiq/web' require 'sidekiq-scheduler/web' # See https://github.com/mperham/sidekiq/wiki/Monitoring#rails-http-basic-auth-from-routes require_relative '../lib/auth_constraint' constraints ->(request) { AuthConstraint.sidekiq?(request) } do mount Sidekiq::Web, at: '/sidekiq' end end