Built motion from commit efa66e19.|2.6.22
[motion2.git] / server / api / team / team.model.js
index 95a7735..138a94e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2d1b=['teams','Fax','Mail','Openchannel','Whatsapp','resolve','all','lodash','./team.attributes','get','then','map','setDataValue','channel','catch'];(function(_0x4ca3f1,_0x4af7c1){var _0x1350b7=function(_0x346e91){while(--_0x346e91){_0x4ca3f1['push'](_0x4ca3f1['shift']());}};_0x1350b7(++_0x4af7c1);}(_0x2d1b,0x7f));var _0xb2d1=function(_0x305e15,_0x4a983d){_0x305e15=_0x305e15-0x0;var _0xb68bc6=_0x2d1b[_0x305e15];return _0xb68bc6;};'use strict';var _=require(_0xb2d1('0x0'));var attributes=require(_0xb2d1('0x1'));function getQueuesByChannel(_0x212d33,_0x2d66cd){var _0x38de1b=_0xb2d1('0x2')+_0x2d66cd+'Queues';return _0x212d33[_0x38de1b]()[_0xb2d1('0x3')](function(_0x7029d5){return _[_0xb2d1('0x4')](_0x7029d5,function(_0x1c17c1){_0x1c17c1[_0xb2d1('0x5')](_0xb2d1('0x6'),_0x2d66cd);return _0x1c17c1;});})[_0xb2d1('0x7')](function(_0x4cbf80){throw _0x4cbf80;});}module['exports']=function(_0x19ddb5){return _0x19ddb5['define']('Team',attributes,{'tableName':_0xb2d1('0x8'),'paranoid':![],'indexes':[],'timestamps':!![],'instanceMethods':{'getAssociatedQueues':function(){var _0x7c999b=this;var _0x201039=['Chat',_0xb2d1('0x9'),_0xb2d1('0xa'),_0xb2d1('0xb'),'Sms','Voice',_0xb2d1('0xc')];return Promise[_0xb2d1('0xd')]()[_0xb2d1('0x3')](function(){var _0x22f6ac=_[_0xb2d1('0x4')](_0x201039,function(_0x3c8160){return getQueuesByChannel(_0x7c999b,_0x3c8160);});return Promise[_0xb2d1('0xe')](_0x22f6ac);})[_0xb2d1('0x7')](function(_0x487c54){throw _0x487c54;});}}});};
\ No newline at end of file
+var _0x9ff7=['define','Team','Mail','Openchannel','resolve','all','lodash','./team.attributes','get','Queues','then','map','channel','catch','exports'];(function(_0xe95cae,_0x21dd59){var _0x25beb0=function(_0x23b8b0){while(--_0x23b8b0){_0xe95cae['push'](_0xe95cae['shift']());}};_0x25beb0(++_0x21dd59);}(_0x9ff7,0x7e));var _0x79ff=function(_0x18bf86,_0xa8e65e){_0x18bf86=_0x18bf86-0x0;var _0x66a378=_0x9ff7[_0x18bf86];return _0x66a378;};'use strict';var _=require(_0x79ff('0x0'));var attributes=require(_0x79ff('0x1'));function getQueuesByChannel(_0xd0b999,_0x46034a){var _0x2f05a7=_0x79ff('0x2')+_0x46034a+_0x79ff('0x3');return _0xd0b999[_0x2f05a7]()[_0x79ff('0x4')](function(_0x187dfe){return _[_0x79ff('0x5')](_0x187dfe,function(_0x5cb703){_0x5cb703['setDataValue'](_0x79ff('0x6'),_0x46034a);return _0x5cb703;});})[_0x79ff('0x7')](function(_0x2f198a){throw _0x2f198a;});}module[_0x79ff('0x8')]=function(_0x4f9c6b){return _0x4f9c6b[_0x79ff('0x9')](_0x79ff('0xa'),attributes,{'tableName':'teams','paranoid':![],'indexes':[],'timestamps':!![],'instanceMethods':{'getAssociatedQueues':function(){var _0x2106aa=this;var _0x2da7ba=['Chat','Fax',_0x79ff('0xb'),_0x79ff('0xc'),'Sms','Voice','Whatsapp'];return Promise[_0x79ff('0xd')]()['then'](function(){var _0x56af8a=_[_0x79ff('0x5')](_0x2da7ba,function(_0x39c2b0){return getQueuesByChannel(_0x2106aa,_0x39c2b0);});return Promise[_0x79ff('0xe')](_0x56af8a);})[_0x79ff('0x7')](function(_0x38da32){throw _0x38da32;});}}});};
\ No newline at end of file