refactor: http-axum split into api/html/federation modules, router.rs, templates per page group
This commit is contained in:
@@ -75,7 +75,7 @@ impl domain::ports::PersonQuery for PersonQueryStub {
|
||||
async fn search_endpoint_returns_200_with_empty_results() {
|
||||
let state = crate::extractors::tests::test_app_state_with_search_port(Arc::new(SearchPortStub));
|
||||
let app = Router::new()
|
||||
.route("/api/v1/search", get(crate::handlers::search::get_search))
|
||||
.route("/api/v1/search", get(crate::api::search::get_search))
|
||||
.with_state(state);
|
||||
|
||||
let resp = app
|
||||
@@ -95,7 +95,7 @@ async fn search_endpoint_returns_200_with_empty_results() {
|
||||
async fn search_endpoint_with_no_query_returns_200() {
|
||||
let state = crate::extractors::tests::test_app_state_with_search_port(Arc::new(SearchPortStub));
|
||||
let app = Router::new()
|
||||
.route("/api/v1/search", get(crate::handlers::search::get_search))
|
||||
.route("/api/v1/search", get(crate::api::search::get_search))
|
||||
.with_state(state);
|
||||
|
||||
let resp = app
|
||||
@@ -120,7 +120,7 @@ async fn person_endpoint_returns_404_for_unknown_id() {
|
||||
let app = Router::new()
|
||||
.route(
|
||||
"/api/v1/people/{id}",
|
||||
get(crate::handlers::search::get_person_handler),
|
||||
get(crate::api::search::get_person_handler),
|
||||
)
|
||||
.with_state(state);
|
||||
|
||||
@@ -145,7 +145,7 @@ async fn person_credits_endpoint_returns_404_for_unknown_id() {
|
||||
let app = Router::new()
|
||||
.route(
|
||||
"/api/v1/people/{id}/credits",
|
||||
get(crate::handlers::search::get_person_credits_handler),
|
||||
get(crate::api::search::get_person_credits_handler),
|
||||
)
|
||||
.with_state(state);
|
||||
|
||||
@@ -183,7 +183,7 @@ async fn get_watchlist_requires_auth() {
|
||||
let app = Router::new()
|
||||
.route(
|
||||
"/api/v1/watchlist",
|
||||
get(crate::handlers::watchlist::get_watchlist_handler),
|
||||
get(crate::api::watchlist::get_watchlist_handler),
|
||||
)
|
||||
.with_state(state);
|
||||
|
||||
@@ -266,7 +266,7 @@ async fn pending_count_endpoint_reports_the_use_case_result() {
|
||||
let app = Router::new()
|
||||
.route(
|
||||
"/api/v1/social/followers/pending/count",
|
||||
get(crate::handlers::social::get_pending_follower_count),
|
||||
get(crate::api::social::get_pending_follower_count),
|
||||
)
|
||||
.with_state(state);
|
||||
|
||||
@@ -295,7 +295,7 @@ async fn get_watchlist_status_requires_auth() {
|
||||
let app = Router::new()
|
||||
.route(
|
||||
"/api/v1/watchlist/{movie_id}",
|
||||
get(crate::handlers::watchlist::get_watchlist_status),
|
||||
get(crate::api::watchlist::get_watchlist_status),
|
||||
)
|
||||
.with_state(state);
|
||||
|
||||
@@ -352,7 +352,7 @@ async fn followers_collection_returns_500_on_federation_error() {
|
||||
let app = Router::new()
|
||||
.route(
|
||||
"/users/{id}/followers",
|
||||
get(crate::handlers::social::get_followers_collection),
|
||||
get(crate::federation::collections::get_followers_collection),
|
||||
)
|
||||
.with_state(state_with_failing_ap_document());
|
||||
|
||||
@@ -376,7 +376,7 @@ async fn following_collection_returns_500_on_federation_error() {
|
||||
let app = Router::new()
|
||||
.route(
|
||||
"/users/{id}/following",
|
||||
get(crate::handlers::social::get_following_collection),
|
||||
get(crate::federation::collections::get_following_collection),
|
||||
)
|
||||
.with_state(state_with_failing_ap_document());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user