Fix local indexing (#78)

This commit is contained in:
Geometrically
2020-10-16 11:21:07 -07:00
committed by GitHub
parent 7983e82b60
commit 5c8ffe961e
2 changed files with 29 additions and 2 deletions

View File

@@ -67,8 +67,8 @@ pub async fn index_local(pool: PgPool) -> Result<Vec<UploadSearchMod>, IndexingE
let user = sqlx::query!(
"
SELECT u.id, u.username FROM users u
INNER JOIN team_members tm ON tm.role = $1
WHERE tm.team_id = $2
INNER JOIN team_members tm ON tm.user_id = u.id
WHERE tm.team_id = $2 AND tm.role = $1
",
crate::models::teams::OWNER_ROLE,
mod_data.team_id,