1
0
Fork 0
forked from gorb/backend

style: cargo fmt

This commit is contained in:
Radical 2025-05-19 15:14:03 +02:00
parent c21762ac7e
commit 78e87b65ce
23 changed files with 555 additions and 276 deletions

View file

@ -1,5 +1,5 @@
use crate::{Data, api::v1::auth::check_access_token, utils::get_auth_header};
use actix_web::{get, web, Error, HttpRequest, HttpResponse, Scope};
use actix_web::{Error, HttpRequest, HttpResponse, Scope, get, web};
use log::error;
use serde::{Deserialize, Serialize};
use sqlx::prelude::FromRow;

View file

@ -37,7 +37,9 @@ pub async fn res(
let cache_result = data.get_cache_key(uuid.to_string()).await;
if let Ok(cache_hit) = cache_result {
return Ok(HttpResponse::Ok().content_type("application/json").body(cache_hit))
return Ok(HttpResponse::Ok()
.content_type("application/json")
.body(cache_hit));
}
let row = sqlx::query_as(&format!(
@ -60,7 +62,9 @@ pub async fn res(
display_name: display_name.unwrap_or_default(),
};
let cache_result = data.set_cache_key(uuid.to_string(), user.clone(), 1800).await;
let cache_result = data
.set_cache_key(uuid.to_string(), user.clone(), 1800)
.await;
if let Err(error) = cache_result {
error!("{}", error);