This commit is contained in:
Niels Andriesse 2021-03-30 11:04:27 +11:00
parent f12b0087c4
commit c4983c9b1c
2 changed files with 2 additions and 4 deletions

View File

@ -200,9 +200,7 @@ pub async fn get_file(
return Ok(json);
}
pub async fn get_group_image(
room_id: &str, auth_token: &str, pool: &storage::DatabaseConnectionPool,
) -> Result<Response, Rejection> {
pub async fn get_group_image(room_id: &str) -> Result<Response, Rejection> {
// Try to read the file
let raw_path = format!("files/{}", room_id);
let path = Path::new(&raw_path);

View File

@ -123,7 +123,7 @@ async fn handle_get_request(
return Err(warp::reject::custom(Error::InvalidRpcCall));
}
};
return handlers::get_group_image(&room_id, &auth_token, &pool).await;
return handlers::get_group_image(&room_id).await;
}
"messages" => {
reject_if_file_server_mode(path)?;