You've already forked AstralRinth
forked from didirus/AstralRinth
Mod Creation (#34)
* Inital creation stuff * File Reader * Upload bodies * Major rework: * Finish Multiple Files * Proper Error Handling * Switch to database models * Run formatter * Make dependencies dependent on Versions over mods * Fixes * Fix clippy * Run lint one last time * Update src/models/mods.rs Co-authored-by: AppleTheGolden <scotsbox@protonmail.com> Co-authored-by: AppleTheGolden <scotsbox@protonmail.com>
This commit is contained in:
@@ -41,16 +41,22 @@ pub async fn index_local(client: mongodb::Client) -> Result<Vec<SearchMod>, Inde
|
||||
mod_game_versions.append(&mut version.game_versions);
|
||||
}
|
||||
|
||||
let mut icon_url = "".to_string();
|
||||
|
||||
if let Some(url) = result.icon_url {
|
||||
icon_url = url;
|
||||
}
|
||||
|
||||
docs_to_add.push(SearchMod {
|
||||
mod_id: result.id,
|
||||
author: result.author,
|
||||
author: "".to_string(),
|
||||
title: result.title,
|
||||
description: result.description,
|
||||
keywords: result.categories,
|
||||
versions: mod_game_versions,
|
||||
downloads: result.downloads,
|
||||
page_url: "".to_string(),
|
||||
icon_url: result.icon_path,
|
||||
icon_url,
|
||||
author_url: "".to_string(),
|
||||
date_created: "".to_string(),
|
||||
created: 0,
|
||||
|
||||
@@ -43,7 +43,7 @@ pub async fn index_mods(db: mongodb::Client) -> Result<(), IndexingError> {
|
||||
.parse()
|
||||
.expect("`INDEX_CURSEFORGE` is not a boolean.")
|
||||
{
|
||||
docs_to_add.append(&mut index_curseforge(1, 400000).await?);
|
||||
docs_to_add.append(&mut index_curseforge(1, 400_000).await?);
|
||||
}
|
||||
//Write Indexes
|
||||
//Relevance Index
|
||||
|
||||
Reference in New Issue
Block a user