Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function quizQuestions(req, res) {
- const query = {
- limit: 10,
- order: [ [sequelize.fn('RANDOM')] ],
- where: {
- id: { $ne: [1, 2, 3] } // This does not work
- }
- };
- Question.findAll(query)
- .then(results => res.status(200).json(map(results, r => r.dataValues)))
- .catch(err => res.status(500).json(err));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement