remove old domain views, controllers

This commit is contained in:
Dylan Knutson
2025-02-27 21:22:26 +00:00
parent 99fe3d951c
commit d45b6047b6
49 changed files with 32 additions and 1598 deletions

View File

@@ -8,14 +8,15 @@ Rails.application.routes.draw do
registrations: "users/registrations",
sessions: "users/sessions",
}
root to: "pages#root"
get "furecs-user-script", to: "pages#furecs_user_script"
# Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html
root to: "pages#root"
get "furecs-user-script", to: "pages#furecs_user_script"
get "us/:script", to: "user_scripts#get", constraints: { script: /.*/ }
namespace :api do
namespace :fa do
get :similar_users, to: "/domain/fa/api#similar_users"
get :search_user_names, to: "/domain/fa/api#search_user_names"
get :object_statuses, to: "/domain/fa/api#object_statuses"
end
end
@@ -57,68 +58,8 @@ Rails.application.routes.draw do
end
end
# Domain::RouteHelper::DOMAIN_POST_RESOURCES.each do |resource_data|
# resolve resource_data.klass.name do |post|
# domain_post_path(post)
# end
# end
# Domain::RouteHelper::DOMAIN_USER_RESOURCES.each do |resource_data|
# resources resource_data.resource_name,
# only: [:show],
# param: resource_data.param,
# controller: resource_data.controller,
# path: "users/#{resource_data.subpath}" do
# resources :posts,
# controller: "domain/posts",
# only: %i[index],
# path: "posts"
# end
# end
# Domain::RouteHelper::DOMAIN_POST_RESOURCES.each do |resource_data|
# resources resource_data.resource_name,
# only: %i[show],
# param: resource_data.param,
# controller: resource_data.controller,
# path: "posts/#{resource_data.subpath}" do
# get :faved_by, on: :member
# end
# end
namespace :domain do
namespace :fa do
resources :users,
param: :url_name,
only: [:show],
constraints: {
url_name: %r{[^/]+},
} do
resources :posts, controller: "/domain/fa/posts", only: %i[index]
end
resources :posts, param: :fa_id, only: %i[show] do
post :scan_post, on: :member
get :favorites, on: :member
end
end
namespace :e621 do
resources :posts, param: :e621_id, only: [:show]
end
namespace :inkbunny, path: "ib" do
resources :users, param: :name, only: [:show] do
resources :posts, controller: "/domain/inkbunny/posts", only: %i[index]
end
resources :posts, param: :ib_post_id, only: %i[show]
end
end
resources :blobs, controller: :blob_entries, only: [:show], param: :sha256
resources :indexed_posts, only: [:index]
get "us/:script", to: "user_scripts#get", constraints: { script: /.*/ }
resources :global_states, path: "state" do
collection do
get "fa-cookies", to: "global_states#fa_cookies"
@@ -141,18 +82,6 @@ Rails.application.routes.draw do
via: :all,
as: :prometheus
namespace :api do
get "search/user/:prefix", to: "search#user"
namespace :fa do
post :enqueue_objects, to: "/domain/fa/api#enqueue_objects"
end
namespace :twitter do
post :enqueue_objects, to: "/domain/twitter/api#enqueue_objects"
post :object_statuses, to: "/domain/twitter/api#object_statuses"
end
end
resources :log_entries, only: %i[index show] do
get :stats, on: :collection