diff options
author | fxqnlr <[email protected]> | 2023-01-26 17:23:06 +0100 |
---|---|---|
committer | fxqnlr <[email protected]> | 2023-01-26 17:23:06 +0100 |
commit | 57ab6addda10a49c18dc09208dfb319c0205e869 (patch) | |
tree | eec6fd465a113d15c819c64a94bc04d425f0e842 /src/commands/modification.rs | |
parent | 1890d59428dfcca861ea1b7820411d80cc60d713 (diff) | |
download | modlist-57ab6addda10a49c18dc09208dfb319c0205e869.tar modlist-57ab6addda10a49c18dc09208dfb319c0205e869.tar.gz modlist-57ab6addda10a49c18dc09208dfb319c0205e869.zip |
Todos; fixed input with "-"
Diffstat (limited to 'src/commands/modification.rs')
-rw-r--r-- | src/commands/modification.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/commands/modification.rs b/src/commands/modification.rs index 6a03b35..c194202 100644 --- a/src/commands/modification.rs +++ b/src/commands/modification.rs | |||
@@ -20,6 +20,7 @@ async fn add(config: Cfg, input: Input) -> MLE<()> { | |||
20 | 20 | ||
21 | pub async fn mod_add(config: Cfg, mod_id: Vec<String>, list: List, disable_download: bool) -> MLE<()> { | 21 | pub async fn mod_add(config: Cfg, mod_id: Vec<String>, list: List, disable_download: bool) -> MLE<()> { |
22 | 22 | ||
23 | //Fix printing (its horrible) | ||
23 | println!("Adding mod(s) {:?}", mod_id); | 24 | println!("Adding mod(s) {:?}", mod_id); |
24 | let projects = if mod_id.len() == 1 { | 25 | let projects = if mod_id.len() == 1 { |
25 | vec![project(String::from(&config.apis.modrinth), &mod_id[0]).await] | 26 | vec![project(String::from(&config.apis.modrinth), &mod_id[0]).await] |
@@ -87,7 +88,8 @@ pub async fn mod_add(config: Cfg, mod_id: Vec<String>, list: List, disable_downl | |||
87 | } | 88 | } |
88 | 89 | ||
89 | fn remove(config: Cfg, input: Input) -> MLE<()> { | 90 | fn remove(config: Cfg, input: Input) -> MLE<()> { |
90 | 91 | ||
92 | //TODO inplement deletion by slug or title | ||
91 | let mod_id = mods_get_id(config.clone(), input.clone().mod_id.unwrap())?; | 93 | let mod_id = mods_get_id(config.clone(), input.clone().mod_id.unwrap())?; |
92 | 94 | ||
93 | let version = userlist_get_current_version(config.clone(), input.clone().list.unwrap().id, String::from(&mod_id))?; | 95 | let version = userlist_get_current_version(config.clone(), input.clone().list.unwrap().id, String::from(&mod_id))?; |