Advertisement
Guest User

Untitled

a guest
Mar 30th, 2017
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. function quizQuestions(req, res) {
  2. const query = {
  3. limit: 10,
  4. order: [ [sequelize.fn('RANDOM')] ],
  5. where: {
  6. id: { $ne: [1, 2, 3] } // This does not work
  7. }
  8. };
  9.  
  10. Question.findAll(query)
  11. .then(results => res.status(200).json(map(results, r => r.dataValues)))
  12. .catch(err => res.status(500).json(err));
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement