Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module.exports = {
- index: (req, res, next) => {
- setTimeout(() => {
- Category.findAll({ include: 'icon' })
- .then((categories) => {
- res.json({ categories });
- })
- .catch((error) => res.status(500).json({ error }));
- }
- , 5000)},
- // 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