randomFree.js 528 B

123456789101112131415161718192021
  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. console.log("HERE!");
  8. randomFreeService.join(req.user).
  9. then((data) => {
  10. console.log(data);
  11. res.send(data);
  12. }).
  13. catch((err) => {
  14. console.log(err);
  15. res.send(err);
  16. });
  17. });
  18. module.exports = router;