Skip to content

Commit

Permalink
Merge pull request #3694 from Tangerine-Community/fix-search-by-id
Browse files Browse the repository at this point in the history
Fix search by
  • Loading branch information
esurface authored Apr 11, 2024
2 parents c040b97 + 9d720c7 commit 7dfea78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/src/routes/group-responses.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module.exports = async (req, res) => {
options.startkey = req.query.id;
options.endkey = `${req.query.id}\ufff0`;
const results = await groupDb.allDocs(options);
const docs = results.rows.map(row => row.doc && row.doc.collection == "TangyFormResponse")
const docs = results.rows.map(row => { if (row.doc && row.doc.collection == "TangyFormResponse") { return row.doc } });
res.send(docs)
}
} catch (error) {
Expand Down

0 comments on commit 7dfea78

Please sign in to comment.