31 lines
1.1 KiB
Ruby
31 lines
1.1 KiB
Ruby
Rails.application.routes.draw do
|
|
# For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html
|
|
|
|
resources :forms do
|
|
member { get :form }
|
|
resources :submissions
|
|
end
|
|
# short link for submission file uploads
|
|
get '/s/:form_id/:submission_id/:id' => 'file_uploads#show', as: :file_upload
|
|
|
|
# form post url to save new submissions
|
|
post '/s/:form_id' => 'submissions#create', as: :submission
|
|
# short URL for form page
|
|
get '/s/:id/form' => 'forms#form', as: :form_submitter
|
|
|
|
get 'oauth/callback', to: 'oauths#callback'
|
|
get 'oauth/:provider', to: 'oauths#oauth', as: :auth_at_provider
|
|
|
|
get '/signup' => 'sessions#new', as: :signup # TODO: add proper signup page
|
|
get '/login' => 'sessions#new', as: :login
|
|
get '/logout' => 'sessions#destroy', as: :logout
|
|
get '/auth' => 'sessions#auth', as: :auth
|
|
|
|
get '/demo' => 'home#demo', as: :demo
|
|
get '/contact' => 'home#contact', as: :contact
|
|
get '/help', to: redirect('https://www.notion.so/Tinyforms-Help-Center-04f13b5908bc46cfb4283079a3cb1149')
|
|
|
|
|
|
root 'home#index'
|
|
end
|