Rewrite to a API trait.
This commit is contained in:
@@ -33,9 +33,9 @@ pub fn disown_game(conn: &mut PgConnection, owned_game: OwnedGame) -> Result<usi
|
||||
.execute(conn)?)
|
||||
}
|
||||
|
||||
pub fn owned_games(conn: &mut PgConnection, uuid: Uuid) -> Result<Vec<Uuid>, DatabaseError> {
|
||||
pub fn owned_games(conn: &mut PgConnection, uuid: Uuid) -> Result<Vec<(Uuid, Option<Uuid>)>, DatabaseError> {
|
||||
Ok(owned_game::table
|
||||
.select(owned_game::game_id)
|
||||
.select((owned_game::game_id, owned_game::location_id))
|
||||
.filter(owned_game::user_id.eq(uuid))
|
||||
.get_results(conn)?)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user