mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-14 18:47:32 +01:00
feat: body-parser-2.x test (#13278)
* feat: body-parser-2.x test * fix req.body
This commit is contained in:
committed by
GitHub
parent
57819810ce
commit
389bc062e3
@@ -46,7 +46,7 @@ Posts.get = async (req, res) => {
|
||||
|
||||
Posts.getIndex = async (req, res) => {
|
||||
const { pid } = req.params;
|
||||
const { sort } = req.body;
|
||||
const { sort } = req.body || {};
|
||||
|
||||
const index = await api.posts.getIndex(req, { pid, sort });
|
||||
if (index === null) {
|
||||
|
||||
Reference in New Issue
Block a user