feat: body-parser-2.x test (#13278)

* feat: body-parser-2.x test

* fix req.body
This commit is contained in:
Barış Soner Uşaklı
2025-03-27 11:29:37 -04:00
committed by GitHub
parent 57819810ce
commit 389bc062e3
4 changed files with 8 additions and 5 deletions

View File

@@ -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) {