Return type room field on Livechat findRoom method. (#13078)

pull/13076/head^2
Renato Becker 6 years ago committed by Rodrigo Nascimento
parent 89d0bc3366
commit 0839002130
  1. 1
      packages/rocketchat-livechat/server/api/lib/livechat.js
  2. 9
      packages/rocketchat-livechat/server/api/v1/room.js

@ -29,6 +29,7 @@ export function findGuest(token) {
export function findRoom(token, rid) {
const fields = {
t: 1,
departmentId: 1,
servedBy: 1,
open: 1,

@ -37,8 +37,7 @@ RocketChat.API.v1.addRoute('livechat/room.close', {
token: String,
});
const { rid } = this.bodyParams;
const { token } = this.bodyParams;
const { rid, token } = this.bodyParams;
const visitor = findGuest(token);
if (!visitor) {
@ -77,8 +76,7 @@ RocketChat.API.v1.addRoute('livechat/room.transfer', {
department: String,
});
const { rid } = this.bodyParams;
const { token, department } = this.bodyParams;
const { rid, token, department } = this.bodyParams;
const guest = findGuest(token);
if (!guest) {
@ -117,8 +115,7 @@ RocketChat.API.v1.addRoute('livechat/room.survey', {
})],
});
const { rid } = this.bodyParams;
const { token, data } = this.bodyParams;
const { rid, token, data } = this.bodyParams;
const visitor = findGuest(token);
if (!visitor) {

Loading…
Cancel
Save