Built motion from commit 52c8a02d.|2.6.29
[motion2.git] / server / api / team / team.model.js
index 7e8e7c5..ba79fce 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf9b6=['catch','exports','define','teams','Chat','Fax','Openchannel','Voice','Whatsapp','all','lodash','then','map','setDataValue'];(function(_0x4d411e,_0x11113a){var _0x27d81=function(_0x2e08a7){while(--_0x2e08a7){_0x4d411e['push'](_0x4d411e['shift']());}};_0x27d81(++_0x11113a);}(_0xf9b6,0x15a));var _0x6f9b=function(_0x29b609,_0x19d388){_0x29b609=_0x29b609-0x0;var _0x54c952=_0xf9b6[_0x29b609];return _0x54c952;};'use strict';var _=require(_0x6f9b('0x0'));var attributes=require('./team.attributes');function getQueuesByChannel(_0x2f9f07,_0x2ae898){var _0x78bf01='get'+_0x2ae898+'Queues';return _0x2f9f07[_0x78bf01]()[_0x6f9b('0x1')](function(_0x1a9799){return _[_0x6f9b('0x2')](_0x1a9799,function(_0x4538ca){_0x4538ca[_0x6f9b('0x3')]('channel',_0x2ae898);return _0x4538ca;});})[_0x6f9b('0x4')](function(_0x2b8f1f){throw _0x2b8f1f;});}module[_0x6f9b('0x5')]=function(_0x3eca95){return _0x3eca95[_0x6f9b('0x6')]('Team',attributes,{'tableName':_0x6f9b('0x7'),'paranoid':![],'indexes':[],'timestamps':!![],'instanceMethods':{'getAssociatedQueues':function(){var _0x5820bc=this;var _0x1f0deb=[_0x6f9b('0x8'),_0x6f9b('0x9'),'Mail',_0x6f9b('0xa'),'Sms',_0x6f9b('0xb'),_0x6f9b('0xc')];return Promise['resolve']()['then'](function(){var _0x409c52=_['map'](_0x1f0deb,function(_0x63168f){return getQueuesByChannel(_0x5820bc,_0x63168f);});return Promise[_0x6f9b('0xd')](_0x409c52);})[_0x6f9b('0x4')](function(_0x34791a){throw _0x34791a;});}}});};
\ No newline at end of file
+var _0x9c99=['Fax','Openchannel','Sms','Voice','Whatsapp','resolve','map','all','lodash','Queues','then','setDataValue','channel','exports','define','Team','Chat'];(function(_0x1a4e8b,_0xb673bd){var _0xa4da36=function(_0x5aef5e){while(--_0x5aef5e){_0x1a4e8b['push'](_0x1a4e8b['shift']());}};_0xa4da36(++_0xb673bd);}(_0x9c99,0x13a));var _0x99c9=function(_0x524efa,_0xbe406e){_0x524efa=_0x524efa-0x0;var _0x775cd5=_0x9c99[_0x524efa];return _0x775cd5;};'use strict';var _=require(_0x99c9('0x0'));var attributes=require('./team.attributes');function getQueuesByChannel(_0x599e57,_0x11e17f){var _0x2796a7='get'+_0x11e17f+_0x99c9('0x1');return _0x599e57[_0x2796a7]()[_0x99c9('0x2')](function(_0x9856b6){return _['map'](_0x9856b6,function(_0x318fb0){_0x318fb0[_0x99c9('0x3')](_0x99c9('0x4'),_0x11e17f);return _0x318fb0;});})['catch'](function(_0x39dc2a){throw _0x39dc2a;});}module[_0x99c9('0x5')]=function(_0xc4321a){return _0xc4321a[_0x99c9('0x6')](_0x99c9('0x7'),attributes,{'tableName':'teams','paranoid':![],'indexes':[],'timestamps':!![],'instanceMethods':{'getAssociatedQueues':function(){var _0x213632=this;var _0x2063fd=[_0x99c9('0x8'),_0x99c9('0x9'),'Mail',_0x99c9('0xa'),_0x99c9('0xb'),_0x99c9('0xc'),_0x99c9('0xd')];return Promise[_0x99c9('0xe')]()[_0x99c9('0x2')](function(){var _0x52746f=_[_0x99c9('0xf')](_0x2063fd,function(_0x33df51){return getQueuesByChannel(_0x213632,_0x33df51);});return Promise[_0x99c9('0x10')](_0x52746f);})['catch'](function(_0x167ba8){throw _0x167ba8;});}}});};
\ No newline at end of file