-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
39 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,33 @@ | ||
Rails.application.routes.draw do | ||
get 'analytics/index' | ||
# Use the custom registrations controller in all environments | ||
|
||
# Devise routes for user registration | ||
devise_for :users, controllers: { | ||
registrations: 'users/registrations' | ||
} | ||
|
||
# Routes for links with standard RESTful actions | ||
resources :links do | ||
member do | ||
get :track_click | ||
end | ||
end | ||
|
||
# Sidekiq monitoring | ||
require 'sidekiq/web' | ||
require 'sidekiq-scheduler/web' | ||
mount Sidekiq::Web => '/sidekiq' | ||
|
||
# Other routes | ||
# Custom routes for user-specific views and analytics | ||
get '/:username/analytics', to: 'analytics#index', as: :user_analytics | ||
get "up" => "rails/health#show", as: :rails_health_check | ||
get '/:username(/:theme)', to: 'links#user_links', as: :user_links, constraints: { theme: /retro|win95|win98/ } | ||
|
||
# Health check route | ||
get 'up' => 'rails/health#show', as: :rails_health_check | ||
|
||
# Root route | ||
root to: 'pages#home' | ||
resources :links, only: [:index, :show, :new, :create, :edit, :update, :destroy] | ||
|
||
# Additional resources | ||
resources :achievements, only: [:index, :show, :new, :create, :edit, :update, :destroy] | ||
get '/:username', to: 'links#user_links', as: 'user_links' | ||
end |