diff --git a/src/update.ts b/src/update.ts index a89a2c2..9b2606f 100644 --- a/src/update.ts +++ b/src/update.ts @@ -19,7 +19,12 @@ export const update = ( return res.status(404).json({ error: 'Record not found' }) } - res.json(await doUpdate(req.params.id, req.body, { req, res })) + const result = await doUpdate(req.params.id, req.body, { req, res }) + + res.json({ + id: req.params.id, + ...result + }) } catch (error) { next(error) }