12345678910111213141516171819202122 |
- const express = require('express');
- const router = express.Router();
- const randomFreeService = require('../../services/matchmaking/randomFree');
- const JSONError = require('../../helpers/index').JSONError;
- /* GET users listing. */
- router.get('/join', function(req, res, next) {
- console.log("HERE!");
- randomFreeService.join(req.user).
- then((data) => {
- console.log(data);
- console.log("Join Request!");
- res.send(data);
- }).
- catch((err) => {
- console.log(err);
- res.send(err);
- });
- });
- module.exports = router;
|