Skip to content

Commit

Permalink
remove the sql folder for now
Browse files Browse the repository at this point in the history
  • Loading branch information
Fleeym committed Jan 9, 2024
1 parent 8ecff2d commit 58b7e09
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
19 changes: 0 additions & 19 deletions sql/mods/index.sql

This file was deleted.

2 changes: 1 addition & 1 deletion src/types/models/mod_entity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ impl Mod {
let records: Vec<ModRecord> = sqlx::query_as!(ModRecord, r#"SELECT * FROM mods WHERE validated = true AND id LIKE $1 LIMIT $2 OFFSET $3"#, query_string, limit, offset)
.fetch_all(&mut *pool)
.await.or(Err(Error::DbError))?;
let count = sqlx::query_scalar!("SELECT COUNT(*) FROM mods")
let count = sqlx::query_scalar!("SELECT COUNT(*) FROM mods WHERE validated = true")
.fetch_one(&mut *pool)
.await.or(Err(Error::DbError))?.unwrap_or(0);

Expand Down

0 comments on commit 58b7e09

Please sign in to comment.