Implemented deleting games as admin.

This commit is contained in:
2026-01-02 15:24:38 +01:00
parent 0c256846f6
commit 661a63af8f
13 changed files with 168 additions and 23 deletions

View File

@@ -35,3 +35,10 @@ pub fn rename_game(
.set(game::name.eq(&name))
.execute(conn)?)
}
pub fn remove_game(
conn: &mut DbConnection,
id: Uuid,
) -> Result<usize, DatabaseError> {
Ok(diesel::delete(game::table.filter(game::id.eq(id))).execute(conn)?)
}