def get(self, orderId: int): order = Order.findById(orderId) if order: return order.json(), 200 else: return {"message": "order not found."}, 404
def delete(self, orderId: int): order = Order.findById(orderId) if order: order.delete() return {"message": "Order deleted."}, 200 else: return {"message": "Order not found."}, 404