You've already forked AstralRinth
forked from didirus/AstralRinth
Add Backblaze Driver (#32)
* Backblaze Driver * Update action to work with new tests * Fix minor issues * Run Formatter + Switch to reqwest json parser
This commit is contained in:
@@ -65,10 +65,7 @@ pub async fn index_curseforge(
|
||||
let text = &res.text().await?;
|
||||
let curseforge_mods: Vec<CurseForgeMod> = serde_json::from_str(text)?;
|
||||
|
||||
let mut max_index = 0;
|
||||
|
||||
for curseforge_mod in curseforge_mods {
|
||||
max_index = curseforge_mod.id;
|
||||
if curseforge_mod.game_slug != "minecraft"
|
||||
|| !curseforge_mod.website_url.contains("/mc-mods/")
|
||||
{
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
use bson::doc;
|
||||
use bson::Bson;
|
||||
use futures::StreamExt;
|
||||
use log::info;
|
||||
use meilisearch_sdk::client::Client;
|
||||
|
||||
use crate::database::models::Item;
|
||||
use crate::database::{Mod, Version};
|
||||
|
||||
use crate::search::{SearchError, SearchMod, SearchRequest};
|
||||
use crate::search::{SearchError, SearchMod};
|
||||
|
||||
pub async fn index_local(client: mongodb::Client) -> Result<Vec<SearchMod>, SearchError> {
|
||||
info!("Indexing local mods!");
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
pub mod curseforge_import;
|
||||
pub mod local_import;
|
||||
|
||||
use crate::database::DatabaseError;
|
||||
use crate::search::indexing::curseforge_import::index_curseforge;
|
||||
use crate::search::indexing::local_import::index_local;
|
||||
use crate::search::{SearchError, SearchMod};
|
||||
|
||||
Reference in New Issue
Block a user