randomFree.js 505 B

1234567891011121314151617181920
  1. const express = require('express');
  2. const router = express.Router();
  3. const randomFreeService = require('../../services/matchmaking/randomFree');
  4. const JSONError = require('../../helpers/index').JSONError;
  5. /* GET users listing. */
  6. router.get('/join', function(req, res, next) {
  7. randomFreeService.join(req.user).
  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;