cards.js 425 B

1234567891011121314151617181920
  1. var express = require('express');
  2. var router = express.Router();
  3. let JSONError = require('../helpers').JSONError;
  4. let Cards = require('../database').Repositories.Cards;
  5. /* GET users listing. */
  6. router.get('/', function(req, res, next) {
  7. Cards.getAllCards().
  8. then((data) => {
  9. console.log(data);
  10. res.send(data);
  11. }).
  12. catch((err) => {
  13. console.log(err);
  14. res.send(err);
  15. });
  16. });
  17. module.exports = router;