def delete(self, node_id): try: bee_db = BeekeeperDB() result_count = bee_db.delete_object( "node_credentials", "id", node_id) bee_db.close() except Exception as e: raise ErrorResponse(f"Unexpected error: {e}" , status_code=HTTPStatus.INTERNAL_SERVER_ERROR) return jsonify({"deleted": result_count})
def delete(self, beehive_id): bee_db = BeekeeperDB() result = bee_db.delete_object("beehives", "id", beehive_id ) bee_db.close() return jsonify({"deleted": result})