properly filter projects by team
This commit is contained in:
parent
1f05515fde
commit
29960e0b4e
1 changed files with 6 additions and 1 deletions
|
@ -50,7 +50,12 @@ async fn projects_page(
|
|||
let team = team.clone();
|
||||
db_conn
|
||||
.interact(move |conn| {
|
||||
diesel::QueryResult::Ok((team.api_keys().load(conn)?, Project::all().load(conn)?))
|
||||
diesel::QueryResult::Ok((
|
||||
team.api_keys().load(conn)?,
|
||||
Project::all()
|
||||
.filter(Project::with_team(&team.id))
|
||||
.load(conn)?,
|
||||
))
|
||||
})
|
||||
.await
|
||||
.unwrap()?
|
||||
|
|
Loading…
Add table
Reference in a new issue