Skip to content

Commit

Permalink
fastn 0.4.69 (fastn upload endpoint fix)
Browse files Browse the repository at this point in the history
  • Loading branch information
amitu committed Jun 17, 2024
1 parent 5b3ddb4 commit 058647e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 8 additions & 7 deletions clift/src/api/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pub use initiate_upload::{
InitiateUploadResponse, PreSignedRequest,
};

pub const ENDPOINT: &str = "https://api.fifthtry.com";
pub const ENDPOINT: &str = "https://www.fifthtry.com";

#[derive(serde::Deserialize)]
pub struct ApiResponse<T> {
Expand All @@ -17,10 +17,11 @@ pub struct ApiResponse<T> {
}

pub fn endpoint(name: &str) -> String {
if let Ok(url) = std::env::var("DEBUG_API_FIFTHTRY_COM") {
let url = format!("{}/ft2/api/{name}/", url);
println!("using debug api, only use this for testing: {url}");
return url;
}
dbg!(format!("{}/ft2/api/{name}/", clift::api::ENDPOINT))
format!(
"{prefix}/ft2/api/{name}/",
prefix = std::env::var("DEBUG_API_FIFTHTRY_COM")
.as_ref()
.map(|s| s.as_str())
.unwrap_or_else(|_| clift::api::ENDPOINT)
)
}
2 changes: 1 addition & 1 deletion fastn/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "fastn"
version = "0.4.68"
version = "0.4.69"
authors.workspace = true
edition.workspace = true
license.workspace = true
Expand Down

0 comments on commit 058647e

Please sign in to comment.