add test mode to checkout
This commit is contained in:
@@ -148,12 +148,17 @@ type Order = Order_ & {
|
||||
}
|
||||
|
||||
export async function loader({ context, request, params }: Route.LoaderArgs) {
|
||||
const order = (await req({
|
||||
const r = await req({
|
||||
url: `/orders/${params.id}`,
|
||||
context,
|
||||
request
|
||||
}).then((r) => r.json())) as Order
|
||||
})
|
||||
|
||||
if (!r.ok) {
|
||||
throw new Response(null, { status: r.status })
|
||||
}
|
||||
|
||||
const order = (await r.json()) as Order
|
||||
return { order }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user