BCMU6UYKFTBIYNJAZVGIQ45BXLTCL7GLW4O4HDMUTCRRWYH2ZQKAC
}
pub async fn post_log_in_mastodon(
form: web::Form<FormDataMastodon>,
data: web::Data<WebData<'_>>,
) -> HttpResponse {
let cached_data = {
let mut cache = data.cache_login.lock().await;
cache.remove(&form.csrf)
};
if cached_data.is_none() {
log::warn!("Unknown data for CSRF: {}", form.csrf);
return HttpResponse::BadRequest().body("Incorrect");
}
HttpResponse::Found()
.append_header((header::LOCATION, "index.html"))
.finish()