A decentralized music tracking and discovery platform built on AT Protocol 🎵 rocksky.app
spotify atproto lastfm musicbrainz scrobbling listenbrainz
98
fork

Configure Feed

Select the types of activity you want to include in your feed.

[scrobbler] add valite token endpoint

+9 -11
+9 -11
crates/scrobbler/src/handlers/mod.rs
··· 126 126 127 127 #[get("/listenbrainz/1/validate-token")] 128 128 pub async fn handle_validate_token( 129 - req: HttpRequest, 129 + _req: HttpRequest, 130 130 ) -> impl Responder { 131 - let token = match req.headers().get("Authorization") { 132 - Some(header) => header.to_str().map_err(actix_web::error::ErrorBadRequest)?, 133 - None => return Ok(HttpResponse::Unauthorized().finish()), 134 - }; 135 - let token = token.trim_start_matches("Token "); 136 - let token = token.trim_start_matches("Bearer "); 137 - 138 - validate_token(token) 139 - .await 140 - .map_err(actix_web::error::ErrorInternalServerError) 131 + HttpResponse::Ok().json( 132 + serde_json::json!({ 133 + "status": "ok", 134 + "payload": { 135 + "valid": true, 136 + }, 137 + }) 138 + ) 141 139 } 142 140 143 141 pub async fn call_method(