Skip to content

Commit

Permalink
fix(publisher): Remove trailing hyphen in bucket name (#354)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jurshsmith authored Dec 12, 2024
1 parent da2bf51 commit c165b19
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions crates/fuel-streams-storage/src/s3/s3_client_opts.rs
Original file line number Diff line number Diff line change
@@ -56,16 +56,14 @@ impl S3ClientOpts {
}

pub fn bucket(&self) -> String {
let bucket = match self.role {
match self.role {
FuelNetworkUserRole::Admin => dotenvy::var("AWS_S3_BUCKET_NAME")
.expect("AWS_S3_BUCKET_NAME must be set for admin role"),
FuelNetworkUserRole::Default => self.fuel_network.to_s3_bucket(),
};

format!(
"{}-{}",
bucket,
self.namespace.to_owned().unwrap_or_default()
)
FuelNetworkUserRole::Default => format!(
"{}-{}",
self.fuel_network.to_s3_bucket(),
self.namespace.to_owned().unwrap_or_default()
),
}
}
}

0 comments on commit c165b19

Please sign in to comment.