Converted the Api to a Restful api.

This commit is contained in:
2026-01-22 22:51:03 +01:00
parent 79ba1e1b44
commit ea9ad80336
34 changed files with 1779 additions and 1497 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, Option<Uuid>)>, DatabaseError> {
pub fn owned_games(conn: &mut PgConnection, uuid: Uuid) -> Result<Vec<(Uuid, Uuid, Option<Uuid>)>, DatabaseError> {
Ok(owned_game::table
.select((owned_game::game_id, owned_game::location_id))
.select((owned_game::user_id, owned_game::game_id, owned_game::location_id))
.filter(owned_game::user_id.eq(uuid))
.get_results(conn)?)
}