X-Git-Url: http://repos.xcallymotion.com/?a=blobdiff_plain;f=server%2Fapi%2Fteam%2Fteam.model.js;h=aeec9ebe0c5f83eddf27a0a300400eac64353dee;hb=4f69ebcfd3a87338adde0f617720ee400a063456;hp=30396fff2e0193552cc83ec298bd07ae660c8c7d;hpb=02a2b9df24f6d8ad3d56655ff7da35118e3b5898;p=motion2.git diff --git a/server/api/team/team.model.js b/server/api/team/team.model.js index 30396ff..aeec9eb 100644 --- a/server/api/team/team.model.js +++ b/server/api/team/team.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb2b4=['exports','Team','Fax','Mail','Openchannel','Sms','Voice','Whatsapp','lodash','./team.attributes','get','Queues','then','map','catch'];(function(_0xa84f2,_0x2874de){var _0x1ae706=function(_0x50db96){while(--_0x50db96){_0xa84f2['push'](_0xa84f2['shift']());}};_0x1ae706(++_0x2874de);}(_0xb2b4,0xbc));var _0x4b2b=function(_0x4e0eb6,_0x240784){_0x4e0eb6=_0x4e0eb6-0x0;var _0x46e432=_0xb2b4[_0x4e0eb6];return _0x46e432;};'use strict';var _=require(_0x4b2b('0x0'));var attributes=require(_0x4b2b('0x1'));function getQueuesByChannel(_0x1ca645,_0x448df6){var _0x36df16=_0x4b2b('0x2')+_0x448df6+_0x4b2b('0x3');return _0x1ca645[_0x36df16]()[_0x4b2b('0x4')](function(_0x4ea346){return _[_0x4b2b('0x5')](_0x4ea346,function(_0x5953df){_0x5953df['setDataValue']('channel',_0x448df6);return _0x5953df;});})[_0x4b2b('0x6')](function(_0x4bae3c){throw _0x4bae3c;});}module[_0x4b2b('0x7')]=function(_0x12b20e){return _0x12b20e['define'](_0x4b2b('0x8'),attributes,{'tableName':'teams','paranoid':![],'indexes':[],'timestamps':!![],'instanceMethods':{'getAssociatedQueues':function(){var _0x457148=this;var _0x2ac3b7=['Chat',_0x4b2b('0x9'),_0x4b2b('0xa'),_0x4b2b('0xb'),_0x4b2b('0xc'),_0x4b2b('0xd'),_0x4b2b('0xe')];return Promise['resolve']()[_0x4b2b('0x4')](function(){var _0x46bcd7=_['map'](_0x2ac3b7,function(_0x1fe309){return getQueuesByChannel(_0x457148,_0x1fe309);});return Promise['all'](_0x46bcd7);})[_0x4b2b('0x6')](function(_0x8d1bc5){throw _0x8d1bc5;});}}});}; \ No newline at end of file +var _0xa0d6=['Fax','Mail','Openchannel','Voice','Whatsapp','resolve','lodash','./team.attributes','get','Queues','then','map','setDataValue','channel','catch','exports','define','Team','teams','Chat'];(function(_0x167cc1,_0x56ef5a){var _0x10bc4b=function(_0xd6a255){while(--_0xd6a255){_0x167cc1['push'](_0x167cc1['shift']());}};_0x10bc4b(++_0x56ef5a);}(_0xa0d6,0x1be));var _0x6a0d=function(_0x54ac4c,_0xf27fc6){_0x54ac4c=_0x54ac4c-0x0;var _0xf0376d=_0xa0d6[_0x54ac4c];return _0xf0376d;};'use strict';var _=require(_0x6a0d('0x0'));var attributes=require(_0x6a0d('0x1'));function getQueuesByChannel(_0x408b99,_0x54dea9){var _0x223f6e=_0x6a0d('0x2')+_0x54dea9+_0x6a0d('0x3');return _0x408b99[_0x223f6e]()[_0x6a0d('0x4')](function(_0x5aab80){return _[_0x6a0d('0x5')](_0x5aab80,function(_0xed7ef7){_0xed7ef7[_0x6a0d('0x6')](_0x6a0d('0x7'),_0x54dea9);return _0xed7ef7;});})[_0x6a0d('0x8')](function(_0x3fc120){throw _0x3fc120;});}module[_0x6a0d('0x9')]=function(_0x3fabd6){return _0x3fabd6[_0x6a0d('0xa')](_0x6a0d('0xb'),attributes,{'tableName':_0x6a0d('0xc'),'paranoid':![],'indexes':[],'timestamps':!![],'instanceMethods':{'getAssociatedQueues':function(){var _0x23f935=this;var _0x3cf5f1=[_0x6a0d('0xd'),_0x6a0d('0xe'),_0x6a0d('0xf'),_0x6a0d('0x10'),'Sms',_0x6a0d('0x11'),_0x6a0d('0x12')];return Promise[_0x6a0d('0x13')]()['then'](function(){var _0x596831=_['map'](_0x3cf5f1,function(_0x555c9e){return getQueuesByChannel(_0x23f935,_0x555c9e);});return Promise['all'](_0x596831);})[_0x6a0d('0x8')](function(_0xb66f20){throw _0xb66f20;});}}});}; \ No newline at end of file