diff options
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs index 2db304b..31a320b 100644 --- a/src/main.rs +++ b/src/main.rs | |||
@@ -3,10 +3,9 @@ use modlist::{ | |||
3 | config::Cfg, | 3 | config::Cfg, |
4 | db::{config_get_current_list, lists_get, lists_get_all_ids}, | 4 | db::{config_get_current_list, lists_get, lists_get_all_ids}, |
5 | download, export, get_current_list, import, list_add, list_change, list_remove, list_version, | 5 | download, export, get_current_list, import, list_add, list_change, list_remove, list_version, |
6 | mod_add, mod_remove, update, IDSelector, List, Modloader, VersionLevel, | 6 | mod_add, mod_remove, update, IDSelector, List, Modloader, VersionLevel, list_list, AddMod, |
7 | }; | 7 | }; |
8 | 8 | ||
9 | //TODO make default list optional | ||
10 | #[derive(Parser)] | 9 | #[derive(Parser)] |
11 | #[command(author, version, about)] | 10 | #[command(author, version, about)] |
12 | struct Cli { | 11 | struct Cli { |
@@ -185,7 +184,9 @@ async fn main() { | |||
185 | false => IDSelector::ModificationID(id), | 184 | false => IDSelector::ModificationID(id), |
186 | }; | 185 | }; |
187 | 186 | ||
188 | mod_add(config, vec![marked_id], listf, download, lock).await | 187 | let add_id = AddMod { id: marked_id, set_version: lock }; |
188 | |||
189 | mod_add(config, vec![add_id], listf, download).await | ||
189 | } | 190 | } |
190 | ModCommands::Remove { id, list } => { | 191 | ModCommands::Remove { id, list } => { |
191 | let listf = match list { | 192 | let listf = match list { |
@@ -223,7 +224,7 @@ async fn main() { | |||
223 | } | 224 | } |
224 | ListCommands::Remove { id } => list_remove(config, id), | 225 | ListCommands::Remove { id } => list_remove(config, id), |
225 | ListCommands::List => { | 226 | ListCommands::List => { |
226 | todo!() | 227 | list_list(config) |
227 | } | 228 | } |
228 | ListCommands::Change { id } => list_change(config, id), | 229 | ListCommands::Change { id } => list_change(config, id), |
229 | ListCommands::Version { | 230 | ListCommands::Version { |