export async function findUserOrder(prisma, orderId, userId, include = {}) {
  const order = await prisma.order.findFirst({
    where: { id: orderId, userId },
    include,
  })

  if (!order) {
    throw Object.assign(new Error('Order not found'), { statusCode: 404 })
  }

  return order
}
