---
# System prepended metadata

title: Untitled

---

If you don't understand how the below works, don't move on!

`src/app.js`

```js
...
app.patch('/artists/:id', artistControllers.patch);
...
```

`src/controllers/artists.js`

```js
...

exports.patch = (req, res) => {
  Artist.findOne({ _id: req.params.id }, (_, artist) => {
    artist.set(req.body);
    artist.save().then(updatedArtist => {
      res.status(200).json(updatedArtist);
    });
  });
};
```