mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-22 10:21:36 +03:00
079b41e608
refs #9866 - req.body is undefined if we don't use the body parser - the content API only offers "fetch" endpoints, but if a component/module in Ghost relies on req.body being present, it can crash - e.g. the authentication service checks for the existence of client_id + client_secret in req.query or req.body - we could theoretically change it from `if (!req.body.client_id` to `if (req.body && !req.body.client_id)`, but that makes the code very hard to read + maintain - we will use the body parser for the content API now - req.body will be {} |
||
---|---|---|
.. | ||
app.js | ||
middleware.js | ||
routes.js |