diff options
Diffstat (limited to 'src/commands/setup.rs')
-rw-r--r-- | src/commands/setup.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/commands/setup.rs b/src/commands/setup.rs index 0223a21..0940959 100644 --- a/src/commands/setup.rs +++ b/src/commands/setup.rs | |||
@@ -1,6 +1,6 @@ | |||
1 | use std::{fs::File, path::Path, io::{Error, ErrorKind}}; | 1 | use std::{fs::File, path::Path, io::{Error, ErrorKind}}; |
2 | 2 | ||
3 | use crate::{config::Cfg, db::{db_setup, get_dbversion, create_dbversion, insert_column, get_lists, get_list, get_current_versions, insert_dl_link}, modrinth::get_raw_versions}; | 3 | use crate::{config::Cfg, db::{db_setup, user_dbversion, create_dbversion, insert_column, get_lists, get_list, get_current_versions, insert_dl_link}, modrinth::get_raw_versions}; |
4 | 4 | ||
5 | pub async fn setup(config: Cfg) -> Result<(), Box<dyn std::error::Error>> { | 5 | pub async fn setup(config: Cfg) -> Result<(), Box<dyn std::error::Error>> { |
6 | 6 | ||
@@ -10,7 +10,7 @@ pub async fn setup(config: Cfg) -> Result<(), Box<dyn std::error::Error>> { | |||
10 | return create(config, db_file); | 10 | return create(config, db_file); |
11 | } | 11 | } |
12 | 12 | ||
13 | match get_dbversion(config.clone()) { | 13 | match user_dbversion(config.clone()) { |
14 | Ok(ver) => { | 14 | Ok(ver) => { |
15 | match ver.as_str() { | 15 | match ver.as_str() { |
16 | _ => return Err(Box::new(Error::new(ErrorKind::Other, "UNKNOWN_VERSION"))) | 16 | _ => return Err(Box::new(Error::new(ErrorKind::Other, "UNKNOWN_VERSION"))) |
@@ -33,7 +33,7 @@ async fn to_02(config: Cfg) -> Result<(), Box<dyn std::error::Error>> { | |||
33 | 33 | ||
34 | for list in lists { | 34 | for list in lists { |
35 | println!("Updating {}", list); | 35 | println!("Updating {}", list); |
36 | insert_column(config.clone(), String::from(&list), String::from("current_download"), sqlite::Type::String)?; | 36 | insert_column(config.clone(), String::from(&list), String::from("current_download"), String::new())?; |
37 | 37 | ||
38 | let full_list = get_list(config.clone(), String::from(&list))?; | 38 | let full_list = get_list(config.clone(), String::from(&list))?; |
39 | 39 | ||