You've already forked AstralRinth
forked from didirus/AstralRinth
Add dependencies to search (#578)
* Add dependencies to search * add attrs for faceting * run prepare * Add user data route from token * update to 24hrs * Fix report bugs
This commit is contained in:
@@ -58,10 +58,7 @@ impl Report {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub async fn get<'a, E>(
|
||||
id: ReportId,
|
||||
exec: E,
|
||||
) -> Result<Option<QueryReport>, sqlx::Error>
|
||||
pub async fn get<'a, E>(id: ReportId, exec: E) -> Result<Option<QueryReport>, sqlx::Error>
|
||||
where
|
||||
E: sqlx::Executor<'a, Database = sqlx::Postgres> + Copy,
|
||||
{
|
||||
@@ -79,8 +76,7 @@ impl Report {
|
||||
{
|
||||
use futures::stream::TryStreamExt;
|
||||
|
||||
let report_ids_parsed: Vec<i64> =
|
||||
report_ids.iter().map(|x| x.0).collect();
|
||||
let report_ids_parsed: Vec<i64> = report_ids.iter().map(|x| x.0).collect();
|
||||
let reports = sqlx::query!(
|
||||
"
|
||||
SELECT r.id, rt.name, r.mod_id, r.version_id, r.user_id, r.body, r.reporter, r.created, r.thread_id, r.closed
|
||||
@@ -141,11 +137,7 @@ impl Report {
|
||||
|
||||
if let Some(thread_id) = thread_id {
|
||||
if let Some(id) = thread_id.thread_id {
|
||||
crate::database::models::Thread::remove_full(
|
||||
ThreadId(id),
|
||||
transaction,
|
||||
)
|
||||
.await?;
|
||||
crate::database::models::Thread::remove_full(ThreadId(id), transaction).await?;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user