Skip to content

Commit

Permalink
fix: prefixes in meilisearch are invalid when uploading a mod
Browse files Browse the repository at this point in the history
  • Loading branch information
sargon64 committed Dec 15, 2023
1 parent 5e2b814 commit d6ba8ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use crate::{
auth::{validate_permissions, Authorization, Permission},
models,
versions::{self, GVersion},
DB_POOL, search::{MeiliMod, MeiliUser, MeiliModStats, MeiliVersion},
DB_POOL, search::{MeiliMod, MeiliUser, MeiliModStats, MeiliVersion, get_prefix},
};

#[derive(SimpleObject, Debug, Deserialize, Serialize, Clone)]
Expand Down Expand Up @@ -791,7 +791,7 @@ pub async fn create_mod(req: &Request, body: Vec<u8>) -> Response {
client
.index(format!(
"{}mods",
std::env::var("MEILI_PREFIX").unwrap_or("".to_string())
get_prefix()
))
.add_or_replace(&[meilimod], None)
.await
Expand Down

0 comments on commit d6ba8ce

Please sign in to comment.