def delete_match(match_id): if request.method == 'DELETE': match_id = int(match_id) return resource_deleted(match) else: return invalid_method()
def delete_offer(offer_id): if request.method == "DELETE": offer_id = int(offer_id) offer = g.db.query(Offer).filter(Offer.id == offer_id).first() g.db.delete(offer) return resource_deleted(offer) else: return invalid_method()
def delete_user(user_id): if request.method == "DELETE": user_id = int(user_id) user = g.db.query(User).filter(User.id == user_id).first() g.db.delete(user) return resource_deleted(user) else: return invalid_method()