Advertisement
Guest User

Untitled

a guest
May 16th, 2018
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import Router from 'express-promise-router';
  2. const router = new Router();
  3. import Currency from '../models/Currency';
  4.  
  5. router.get('/',
  6.   async (req, res) => {
  7.     const currencies = await Currency.find({}).sort({ cc: -1 });
  8.     res.json(currencies);
  9.   }
  10. );
  11.  
  12. export default router;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement