feat(stalk): remove dead mobile-legends, free-fire, tiktok, instagram

Audit live-probed all 8 stalk upstreams today. 4 alive (github, youtube,
genshin enka, twitter fxtwitter). 4 dead with no free alternative reachable
from VPS: mobile-legends (gempaytopup /stalk-ml now 405), free-fire
(discordbot.freefirecommunity dead 404), tiktok (WAF -> login page, no
rehydration data), instagram (mollygram captcha; i.instagram requires
login/rate-limited 401). All free alternates probed dead (onrender FF 404,
freefireapi.me 404, i.instagram 401 require_login, m.tiktok 403).

Keep 4 alive: github, youtube, genshin, twitter. stalk.rs now clippy-clean.
This commit is contained in:
asepharyana
2026-09-02 13:29:39 +07:00
parent 5470d74921
commit 93828c7253
5 changed files with 6 additions and 441 deletions
-98
View File
@@ -68,58 +68,6 @@ pub async fn youtube_handler(
Ok((StatusCode::OK, Json(result)))
}
/// GET /stalk/mobile-legends?user_id=...&zone_id=... (aliases: userid, zoneid)
#[utoipa::path(
get,
path = "/stalk/mobile-legends",
tag = "stalk",
operation_id = "stalk_mobile_legends",
params(StalkParams),
responses(
(status = 200, description = "Mobile Legends player info", body = Value),
(status = 400, description = "Missing user_id/zone_id"),
(status = 502, description = "Upstream error"),
)
)]
pub async fn mobile_legends_handler(
Query(params): Query<StalkParams>,
) -> Result<(StatusCode, Json<Value>), AppError> {
let user_id = params
.user_id
.or(params.userid)
.ok_or_else(|| AppError::BadRequest("Missing 'user_id' parameter".to_string()))?;
let zone_id = params
.zone_id
.or(params.zoneid)
.ok_or_else(|| AppError::BadRequest("Missing 'zone_id' parameter".to_string()))?;
let result = use_cases::mobile_legends(&user_id, &zone_id).await?;
Ok((StatusCode::OK, Json(result)))
}
/// GET /stalk/free-fire?user_id=... (alias: userid)
#[utoipa::path(
get,
path = "/stalk/free-fire",
tag = "stalk",
operation_id = "stalk_free_fire",
params(StalkParams),
responses(
(status = 200, description = "Free Fire player info", body = Value),
(status = 400, description = "Missing user_id"),
(status = 502, description = "Upstream error"),
)
)]
pub async fn free_fire_handler(
Query(params): Query<StalkParams>,
) -> Result<(StatusCode, Json<Value>), AppError> {
let user_id = params
.user_id
.or(params.userid)
.ok_or_else(|| AppError::BadRequest("Missing 'user_id' parameter".to_string()))?;
let result = use_cases::free_fire(&user_id).await?;
Ok((StatusCode::OK, Json(result)))
}
/// GET /stalk/genshin-impact?user_id=... (alias: userid)
#[utoipa::path(
get,
@@ -166,49 +114,3 @@ pub async fn twitter_handler(
let result = use_cases::twitter(&username).await?;
Ok((StatusCode::OK, Json(result)))
}
/// GET /stalk/tiktok?username=...
#[utoipa::path(
get,
path = "/stalk/tiktok",
tag = "stalk",
operation_id = "stalk_tiktok",
params(StalkParams),
responses(
(status = 200, description = "TikTok user profile", body = Value),
(status = 400, description = "Missing username"),
(status = 502, description = "Upstream error"),
)
)]
pub async fn tiktok_handler(
Query(params): Query<StalkParams>,
) -> Result<(StatusCode, Json<Value>), AppError> {
let username = params
.username
.ok_or_else(|| AppError::BadRequest("Missing 'username' parameter".to_string()))?;
let result = use_cases::tiktok(&username).await?;
Ok((StatusCode::OK, Json(result)))
}
/// GET /stalk/instagram?username=...
#[utoipa::path(
get,
path = "/stalk/instagram",
tag = "stalk",
operation_id = "stalk_instagram",
params(StalkParams),
responses(
(status = 200, description = "Instagram user profile", body = Value),
(status = 400, description = "Missing username"),
(status = 502, description = "Upstream error"),
)
)]
pub async fn instagram_handler(
Query(params): Query<StalkParams>,
) -> Result<(StatusCode, Json<Value>), AppError> {
let username = params
.username
.ok_or_else(|| AppError::BadRequest("Missing 'username' parameter".to_string()))?;
let result = use_cases::instagram(&username).await?;
Ok((StatusCode::OK, Json(result)))
}
-16
View File
@@ -282,14 +282,6 @@ pub fn build_router(app_state: Arc<AppState>) -> anyhow::Result<Router> {
"/stalk/youtube",
axum::routing::get(crate::presentation::handler::stalk::youtube_handler),
)
.route(
"/stalk/mobile-legends",
axum::routing::get(crate::presentation::handler::stalk::mobile_legends_handler),
)
.route(
"/stalk/free-fire",
axum::routing::get(crate::presentation::handler::stalk::free_fire_handler),
)
.route(
"/stalk/genshin-impact",
axum::routing::get(crate::presentation::handler::stalk::genshin_handler),
@@ -298,14 +290,6 @@ pub fn build_router(app_state: Arc<AppState>) -> anyhow::Result<Router> {
"/stalk/twitter",
axum::routing::get(crate::presentation::handler::stalk::twitter_handler),
)
.route(
"/stalk/tiktok",
axum::routing::get(crate::presentation::handler::stalk::tiktok_handler),
)
.route(
"/stalk/instagram",
axum::routing::get(crate::presentation::handler::stalk::instagram_handler),
)
// Search routes
.route(
"/search/bmkg",