Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. module.exports = {
  2. index: (req, res, next) => {
  3. setTimeout(() => {
  4. Category.findAll({ include: 'icon' })
  5. .then((categories) => {
  6. res.json({ categories });
  7. })
  8. .catch((error) => res.status(500).json({ error }));
  9. }
  10. , 5000)},
  11.  
  12. // lignes rajoutées: 2 et 10 (en gros inclure tout le bloc dans une fonction setTimeout(()=>{}, timeOutInMs);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement