Rewrite to a API trait.

This commit is contained in:
2026-01-11 14:12:54 +01:00
parent ea9f05b048
commit 88f8cf76ef
45 changed files with 1384 additions and 1030 deletions

View File

@@ -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)?)
}