summaryrefslogtreecommitdiff
path: root/src/commands/update.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/update.rs')
-rw-r--r--src/commands/update.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/commands/update.rs b/src/commands/update.rs
index 284d289..d278a78 100644
--- a/src/commands/update.rs
+++ b/src/commands/update.rs
@@ -4,13 +4,13 @@ use reqwest::Client;
4 4
5use futures_util::StreamExt; 5use futures_util::StreamExt;
6 6
7use crate::{config::Cfg, modrinth::{projects, Project, versions, extract_current_version, Version}, get_current_list, db::{get_mods_from_list, get_versions, get_list_version, change_list_versions}, List}; 7use crate::{config::Cfg, modrinth::{projects, Project, versions, extract_current_version, Version}, get_current_list, db::{userlist_get_all_ids, get_versions, get_list_version, change_list_versions}, List};
8 8
9pub async fn update(config: Cfg) -> Result<(), Box<dyn std::error::Error>> { 9pub async fn update(config: Cfg) -> Result<(), Box<dyn std::error::Error>> {
10 10
11 let current_list = get_current_list(config.clone())?; 11 let current_list = get_current_list(config.clone())?;
12 12
13 let mods = get_mods_from_list(config.clone(), current_list.clone())?; 13 let mods = userlist_get_all_ids(config.clone(), current_list.clone().id)?;
14 14
15 let mut versions = get_versions(config.clone(), mods.clone())?; 15 let mut versions = get_versions(config.clone(), mods.clone())?;
16 versions.sort_by_key(|ver| ver.mod_id.clone()); 16 versions.sort_by_key(|ver| ver.mod_id.clone());