minorfix4
All checks were successful
deploy / deploy (push) Successful in 1m4s

This commit is contained in:
2024-10-22 13:15:37 +03:00
parent a25e16132c
commit 90b0f0bc3a
5 changed files with 34 additions and 36 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,
file_key: &str,
filename: &str,
) -> Result<(), actix_web::Error> {
redis
.sadd::<&str, &str, ()>(user_id, file_key)
.sadd::<&str, &str, ()>(user_id, filename)
.await
.map_err(|_| ErrorInternalServerError("Failed to save file_key in Redis"))?; // Добавляем имя файла в набор пользователя
.map_err(|_| ErrorInternalServerError(format!("Failed to save {} in Redis", filename)))?; // Добавляем имя файла в набор пользователя
Ok(())
}