Code Room
Code reviewMedium
Question
Review this TypeScript endpoint that resolves a list of product ids to full records.
What a strong answer looks like
Separate real bugs from style. Rank issues by severity, point at the root cause rather than the symptom, and suggest a concrete fix — specific and kind.
Learn the concepts
app.post('/products/resolve', async (req, res) => { const ids: string[] = req.body.ids; const products = await Promise.all( ids.map((id) => db.products.findById(id)), ); res.json({ products });});Run or narrate your approach, then ask the coach.