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