Skip to content

Commit

Permalink
Automatically switch to correct endpoint.
Browse files Browse the repository at this point in the history
  • Loading branch information
turulix committed Feb 29, 2024
1 parent 7b2daed commit c584421
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ impl DeepLApiBuilder {
/// Create a new instance of the DeepLApi
pub fn new(&self) -> DeepLApi {
let client = self.client.clone().unwrap_or_else(reqwest::Client::new);
let endpoint = if self.is_pro {
let endpoint = if self.is_pro || !self.key.ends_with(":fx") {
"https://api.deepl.com/v2/"
} else {
"https://api-free.deepl.com/v2/"
Expand Down

0 comments on commit c584421

Please sign in to comment.