You've already forked AstralRinth
forked from didirus/AstralRinth
More APIv2 Fixes (#210)
* Refactor search to not spam the database with queries, new utility routes for V2 * Run prepare * More V2 Fixes * Run prepare + formatter
This commit is contained in:
@@ -1128,7 +1128,7 @@ impl ProjectType {
|
||||
}
|
||||
|
||||
pub async fn get_many_id<'a, E>(
|
||||
names: &Vec<String>,
|
||||
names: &[String],
|
||||
exec: E,
|
||||
) -> Result<Vec<ProjectType>, sqlx::Error>
|
||||
where
|
||||
|
||||
@@ -173,7 +173,7 @@ impl TeamMember {
|
||||
permissions: perms,
|
||||
accepted: m.accepted,
|
||||
user: User {
|
||||
id: UserId(m.id),
|
||||
id: UserId(m.user_id),
|
||||
github_id: m.github_id,
|
||||
name: m.user_name,
|
||||
email: m.email,
|
||||
|
||||
@@ -199,7 +199,7 @@ impl User {
|
||||
let projects = sqlx::query!(
|
||||
"
|
||||
SELECT m.id FROM mods m
|
||||
INNER JOIN team_members tm ON tm.team_id = m.team_id
|
||||
INNER JOIN team_members tm ON tm.team_id = m.team_id AND tm.accepted = TRUE
|
||||
WHERE tm.user_id = $1 AND m.status = (SELECT s.id FROM statuses s WHERE s.status = $2)
|
||||
",
|
||||
user_id as UserId,
|
||||
@@ -225,7 +225,7 @@ impl User {
|
||||
let projects = sqlx::query!(
|
||||
"
|
||||
SELECT m.id FROM mods m
|
||||
INNER JOIN team_members tm ON tm.team_id = m.team_id
|
||||
INNER JOIN team_members tm ON tm.team_id = m.team_id AND tm.accepted = TRUE
|
||||
WHERE tm.user_id = $1
|
||||
",
|
||||
user_id as UserId,
|
||||
|
||||
Reference in New Issue
Block a user