docs
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
use std::collections::HashMap;
|
||||
use actix_web::error::ErrorInternalServerError;
|
||||
use once_cell::sync::Lazy;
|
||||
use redis::aio::MultiplexedConnection;
|
||||
use redis::AsyncCommands;
|
||||
use std::collections::HashMap;
|
||||
|
||||
pub static MIME_TYPES: Lazy<HashMap<&'static str, &'static str>> = Lazy::new(|| {
|
||||
let mut m = HashMap::new();
|
||||
@@ -36,7 +36,6 @@ pub fn get_mime_type(extension: &str) -> Option<&'static str> {
|
||||
MIME_TYPES.get(extension).copied()
|
||||
}
|
||||
|
||||
|
||||
/// Ищет файл в Redis по шаблону имени
|
||||
pub async fn find_file_by_pattern(
|
||||
redis: &mut MultiplexedConnection,
|
||||
@@ -67,4 +66,4 @@ pub async fn store_file_info(
|
||||
.await
|
||||
.map_err(|_| ErrorInternalServerError("Failed to store file info in Redis"))?;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user