|
@ -157,19 +157,19 @@ router.get(APIv2.Sessions.ParticipantsAvatar, function (req, res) {
|
|
|
* sessionId 会话ID
|
|
|
*/
|
|
|
router.put(APIv2.Sessions.Participant, function (req, res) {
|
|
|
let user = req.query.user;
|
|
|
let user = req.params.participant_id;
|
|
|
if (!user) {
|
|
|
throw {httpStatus: 406, message: 'Missing user.'};
|
|
|
throw {httpStatus: 406, message: 'Missing participant_id.'};
|
|
|
}
|
|
|
|
|
|
let sessionId = req.query.sessionId;
|
|
|
let sessionId = req.params.session_id;
|
|
|
if (!sessionId) {
|
|
|
throw {httpStatus: 406, message: 'Missing sessionId.'};
|
|
|
throw {httpStatus: 406, message: 'Missing session_id.'};
|
|
|
}
|
|
|
|
|
|
let participants = new Participants();
|
|
|
|
|
|
ControllerUtil.regModelEventHandler(sessions, res);
|
|
|
ControllerUtil.regModelEventHandler(participants, res);
|
|
|
participants.addUser(sessionId, user);
|
|
|
});
|
|
|
|