For put and post, why do I need to store the callback call in a variable?

Hi there, I am currently working on the Express Cumulative Project (Boss Machine):
https://www.codecademy.com/paths/web-development/tracks/javascript-back-end-development/modules/express-cumulative-project/informationals/bapi-p4-boss-machine

It gave me a hard time yesterday, because I couldn’t get the post and put routes to work. I finally peeked at the solution. I found out that my fault was simply not to store the callback call in a variable:

minionsRouter.post(’/’, (req, res, next) => {
const newMinion = addToDatabase(‘minions’, req.body);
res.status(201).send(newMinion);
});

Why is that necessary? Why can I not just call ‘addToDatabase(‘minions’, req.body);’ ?

Regards,

Frank.