0👍
✅
Change to req.query works
async index (req, res) {
try {
const { adminId } = req.query
const userData = await User.findAll({
where: { AdminId: adminId },
include: [UserStatus,
{ model: SurveyResult, include: [Survey] }]
})
.map(user => user.toJSON())
res.send(userData)
} catch (err) {
console.log(err)
}
Source:stackexchange.com