Fix plugin listing for rar files, temporary backfil shim

`main` is just backfilling the eixsting bad rar files in the db. I will return script to normal once it's run.
This commit is contained in:
2021-07-26 01:16:43 -04:00
parent 87ca90be06
commit 5d62fb7d61
3 changed files with 285 additions and 267 deletions

View File

@@ -136,3 +136,11 @@ pub async fn batched_insert<'a>(
}
Ok(saved_mods)
}
#[instrument(level = "debug", skip(pool))]
pub async fn get(pool: &sqlx::Pool<sqlx::Postgres>, id: i32) -> Result<Option<Mod>> {
sqlx::query_as!(Mod, "SELECT * FROM mods WHERE id = $1", id)
.fetch_optional(pool)
.await
.context("Failed to get mod")
}