def delete_heartbeat(id): if request.method == 'DELETE' or (request.method == 'POST' and request.json['_method'] == 'delete'): response = db.delete_heartbeat(id) if response: return jsonify(status="ok") else: return jsonify(status="error", message="failed to delete heartbeat")
def delete_heartbeat(id): if request.method == 'DELETE' or (request.method == 'POST' and request.json['_method'] == 'delete'): try: response = db.delete_heartbeat(id) except Exception as e: return jsonify(status="error", message=str(e)), 500 if response: return jsonify(status="ok") else: return jsonify(status="error", message="not found"), 404
def delete_heartbeat(tenant, id): tenant = generateDBName(tenant) try: response = db.delete_heartbeat(tenant, id) except Exception as e: return jsonify(status="error", message=str(e)), 500 if response: return jsonify(status="ok") else: return jsonify(status="error", message="not found"), 404
def delete(self) -> bool: return db.delete_heartbeat(self.id)
def delete(self): return db.delete_heartbeat(self.id)