Implemented deleting games as admin.
This commit is contained in:
@@ -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)?)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user