Skip to content

Commit 4550330

Browse files
Change dev movey_url, send params in post request
1 parent 8777663 commit 4550330

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

language/tools/move-package/src/resolution/resolution_graph.rs

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,14 @@ use move_core_types::account_address::AccountAddress;
1919
use move_symbol_pool::Symbol;
2020
use petgraph::{algo, graphmap::DiGraphMap, Outgoing};
2121
use ptree::{print_tree, TreeBuilder};
22-
use std::{cell::RefCell, collections::{BTreeMap, BTreeSet}, path::{Path, PathBuf}, process::Command, rc::Rc, thread};
22+
use std::{
23+
cell::RefCell,
24+
collections::{BTreeMap, BTreeSet},
25+
path::{Path, PathBuf},
26+
process::Command,
27+
rc::Rc,
28+
thread,
29+
};
2330

2431
pub type ResolvedTable = ResolutionTable<AccountAddress>;
2532
pub type ResolvedPackage = ResolutionPackage<AccountAddress>;
@@ -531,24 +538,20 @@ impl ResolvingGraph {
531538
dep_name
532539
)
533540
})?;
534-
let git_url = git_info.git_url.clone();
535-
let git_rev = git_info.git_rev.clone();
541+
let git_url = git_info.git_url.clone().to_string();
542+
let git_rev = git_info.git_rev.clone().to_string();
536543
let subdir = git_info.subdir.clone();
537-
let subdir = subdir
538-
.as_path().to_string_lossy().to_string();
544+
let subdir = subdir.as_path().to_string_lossy().to_string();
539545
thread::spawn(move || {
540546
let movey_url: &str;
541547
if cfg!(debug_assertions) {
542-
movey_url = "https://movey-app-staging.herokuapp.com/api/v1/download";
548+
movey_url = "http://staging.movey.net/api/v1/download";
543549
} else {
544550
movey_url = "https://movey.net/api/v1/download";
545551
}
546-
reqwest::blocking::get(
547-
format!(
548-
"{}?url={}&rev={}&subdir={}",
549-
movey_url, git_url, git_rev, subdir
550-
).as_str()
551-
).unwrap();
552+
let params = [("url", git_url), ("rev", git_rev), ("subdir", subdir)];
553+
let client = reqwest::blocking::Client::new();
554+
let _ = client.post(movey_url).form(&params).send();
552555
});
553556
}
554557
}

0 commit comments

Comments
 (0)