refactor: rename s3 feature flag to aws_s3 (#3341)

This commit is contained in:
Chethan Rao
2024-01-19 12:55:48 +05:30
committed by GitHub
parent 5255ba9170
commit 1c04ac7512
5 changed files with 22 additions and 22 deletions

View File

@ -1,8 +1,8 @@
pub mod helpers;
#[cfg(feature = "s3")]
#[cfg(feature = "aws_s3")]
pub mod s3_utils;
#[cfg(not(feature = "s3"))]
#[cfg(not(feature = "aws_s3"))]
pub mod fs_utils;
use api_models::files;
@ -29,9 +29,9 @@ pub async fn files_create_core(
)
.await?;
let file_id = common_utils::generate_id(consts::ID_LENGTH, "file");
#[cfg(feature = "s3")]
#[cfg(feature = "aws_s3")]
let file_key = format!("{}/{}", merchant_account.merchant_id, file_id);
#[cfg(not(feature = "s3"))]
#[cfg(not(feature = "aws_s3"))]
let file_key = format!("{}_{}", merchant_account.merchant_id, file_id);
let file_new = diesel_models::file::FileMetadataNew {
file_id: file_id.clone(),