mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-09 08:47:11 -05:00
34 lines
789 B
Ruby
34 lines
789 B
Ruby
# frozen_string_literal: true
|
|
|
|
Rails.application.routes.draw do
|
|
mount Rswag::Api::Engine => '/api-docs'
|
|
mount Rswag::Ui::Engine => '/api-docs'
|
|
get 'settings/theme', to: 'settings#theme'
|
|
get 'export', to: 'export#index'
|
|
get 'export/download', to: 'export#download'
|
|
|
|
resources :imports
|
|
resources :stats, only: :index do
|
|
collection do
|
|
post :update
|
|
end
|
|
end
|
|
get 'stats/:year', to: 'stats#show', constraints: { year: /\d{4}/ }
|
|
|
|
root to: 'home#index'
|
|
devise_for :users
|
|
|
|
post 'settings/generate_api_key', to: 'devise/api_keys#create', as: :generate_api_key
|
|
|
|
get 'points', to: 'points#index'
|
|
|
|
namespace :api do
|
|
namespace :v1 do
|
|
resources :points
|
|
|
|
namespace :overland do
|
|
resources :batches, only: :create
|
|
end
|
|
end
|
|
end
|
|
end
|