handlers-refactored
Some checks failed
deploy / deploy (push) Failing after 4m4s

This commit is contained in:
2024-10-22 00:36:42 +03:00
parent 4a1f985cce
commit 9fcce86075
9 changed files with 245 additions and 232 deletions

View File

@@ -85,11 +85,11 @@ pub async fn get_id_by_token(token: &str) -> Result<String, Box<dyn Error>> {
pub async fn user_added_file(
redis: &mut MultiplexedConnection,
user_id: &str,
filename: &str,
file_key: &str,
) -> Result<(), actix_web::Error> {
redis
.sadd::<&str, &str, ()>(user_id, filename)
.sadd::<&str, &str, ()>(user_id, file_key)
.await
.map_err(|_| ErrorInternalServerError("Failed to save filename in Redis"))?; // Добавляем имя файла в набор пользователя
.map_err(|_| ErrorInternalServerError("Failed to save file_key in Redis"))?; // Добавляем имя файла в набор пользователя
Ok(())
}