Unverified Commit 4a522689 authored by Peter Kellner's avatar Peter Kellner Committed by GitHub

docs: Update route handles TS code snippets (#59021)

parent 3caa2891
......@@ -99,7 +99,7 @@ export async function GET(request: Request) {
const res = await fetch(`https://data.mongodb-api.com/product/${id}`, {
headers: {
'Content-Type': 'application/json',
'API-Key': process.env.DATA_API_KEY,
'API-Key': process.env.DATA_API_KEY!,
},
})
const product = await res.json()
......@@ -132,7 +132,7 @@ export async function POST() {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'API-Key': process.env.DATA_API_KEY,
'API-Key': process.env.DATA_API_KEY!,
},
body: JSON.stringify({ time: new Date().toISOString() }),
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment