Fixed image upload bug due to aws creds

This commit is contained in:
Franklin 2023-04-26 15:44:39 -04:00
parent 47b258d49f
commit bf6dd9aad4

View File

@ -158,9 +158,9 @@ pub async fn get_all_contacts(db_conn: web::Data<Arc<PgPool>>, request: actix_we
#[post("images/{item}")] #[post("images/{item}")]
pub async fn upload_image( pub async fn upload_image(
aws_client: web::Data<Arc<aws_sdk_s3::Client>>, aws_client: web::Data<Arc<aws_sdk_s3::Client>>,
request: actix_web::HttpRequest,
path_vars: Path<Item>, path_vars: Path<Item>,
multipart: Multipart, multipart: Multipart,
request: actix_web::HttpRequest,
) -> TypedHttpResponse<String> { ) -> TypedHttpResponse<String> {
auth!(request); auth!(request);
services::admin::upload_image(&aws_client, path_vars.clone(), multipart).await services::admin::upload_image(&aws_client, path_vars.clone(), multipart).await