Skip to content

Commit

Permalink
response method updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Aditya-Thakur committed Jan 22, 2021
1 parent 195ed64 commit b15cacf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions controllers/responseController.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ const response = mongoose.model('Response');
var router = express.Router();


router.post('/fetchMyResponses', (req,res) => {
response.find( { surveyId: req.body.surveyId }, function(err, docs) {
router.get('/fetchResponses:surveyId', (req,res) => {
console.log(req.params.surveyId);
response.find( { surveyId: req.params.surveyId }, function(err, docs) {
if(!err) {
res.json(docs);
} else {
Expand Down

1 comment on commit b15cacf

@vercel
Copy link

@vercel vercel bot commented on b15cacf May 30, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.