mirror of
https://github.com/docker/getting-started-app.git
synced 2025-04-02 11:24:23 -04:00
11 lines
268 B
JavaScript
11 lines
268 B
JavaScript
const db = require('../persistence');
|
|
|
|
module.exports = async (req, res) => {
|
|
await db.updateItem(req.params.id, {
|
|
name: req.body.name,
|
|
completed: req.body.completed,
|
|
});
|
|
const item = await db.getItem(req.params.id);
|
|
res.send(item);
|
|
};
|