diff --git a/docs/02-app/01-building-your-application/01-routing/10-route-handlers.mdx b/docs/02-app/01-building-your-application/01-routing/10-route-handlers.mdx index 3da9d0cb5a2e0..a79988e1bf5a9 100644 --- a/docs/02-app/01-building-your-application/01-routing/10-route-handlers.mdx +++ b/docs/02-app/01-building-your-application/01-routing/10-route-handlers.mdx @@ -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() }), })