Kaynağa Gözat

Change default Send host to the public Mozilla one

timvisee 7 yıl önce
ebeveyn
işleme
1cc0d6345f
3 değiştirilmiş dosya ile 5 ekleme ve 5 silme
  1. 3 0
      api/src/config.rs
  2. 0 3
      cli/src/app.rs
  3. 2 2
      cli/src/cmd/arg/host.rs

+ 3 - 0
api/src/config.rs

@@ -1,5 +1,8 @@
 use reqwest::StatusCode;
 
+/// The default Send host to use.
+pub const SEND_DEFAULT_HOST: &'static str = "https://send.firefox.com/";
+
 /// The HTTP status code that is returned for expired or non existant files.
 pub const HTTP_STATUS_EXPIRED: StatusCode = StatusCode::NotFound;
 

+ 0 - 3
cli/src/app.rs

@@ -9,6 +9,3 @@ pub const APP_AUTHOR: &'static str = "Tim Visee <https://timvisee.com/>";
 
 /// Application about information.
 pub const APP_ABOUT: &'static str = "A simple Firefox Send CLI client.";
-
-/// The default Send host to use.
-pub const SEND_DEF_HOST: &'static str = "http://localhost:8080/";

+ 2 - 2
cli/src/cmd/arg/host.rs

@@ -1,8 +1,8 @@
 use clap::{Arg, ArgMatches};
 use failure::Fail;
+use ffsend_api::config::SEND_DEFAULT_HOST;
 use ffsend_api::url::Url;
 
-use app::SEND_DEF_HOST;
 use host::parse_host;
 use super::{CmdArg, CmdArgOption};
 use util::{ErrorHints, quit_error};
@@ -21,7 +21,7 @@ impl CmdArg for ArgHost {
             .short("h")
             .alias("server")
             .value_name("URL")
-            .default_value(SEND_DEF_HOST)
+            .default_value(SEND_DEFAULT_HOST)
             .help("The remote host to upload to")
     }
 }