summaryrefslogtreecommitdiff
path: root/src/commands/update.rs
diff options
context:
space:
mode:
authorfxqnlr <[email protected]>2022-11-06 23:06:54 +0100
committerfxqnlr <[email protected]>2022-11-06 23:06:54 +0100
commitea50af892c4268ae06f6df40ee435eadd076228d (patch)
treedce2f1fed88f168552b8069d22d9176d7dd2879d /src/commands/update.rs
parentc33b8be79e8cfac9e2fa76c1f63c85e020cdf4a0 (diff)
downloadmodlist-ea50af892c4268ae06f6df40ee435eadd076228d.tar
modlist-ea50af892c4268ae06f6df40ee435eadd076228d.tar.gz
modlist-ea50af892c4268ae06f6df40ee435eadd076228d.zip
halfswitch to rusqlite; db tests
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());