Built motion from commit d1eab355.|2.6.28
[motion2.git] / server / api / team / team.model.js
index e7e707a..9b7f15f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6e55=['then','setDataValue','channel','catch','exports','teams','Chat','Fax','Openchannel','Sms','Voice','Whatsapp','resolve','map','get'];(function(_0x323948,_0x862117){var _0x2a738e=function(_0x18d971){while(--_0x18d971){_0x323948['push'](_0x323948['shift']());}};_0x2a738e(++_0x862117);}(_0x6e55,0xc2));var _0x56e5=function(_0x5b678c,_0x1a0b43){_0x5b678c=_0x5b678c-0x0;var _0x66581f=_0x6e55[_0x5b678c];return _0x66581f;};'use strict';var _=require('lodash');var attributes=require('./team.attributes');function getQueuesByChannel(_0xe7e03a,_0x518584){var _0x1de36d=_0x56e5('0x0')+_0x518584+'Queues';return _0xe7e03a[_0x1de36d]()[_0x56e5('0x1')](function(_0x453299){return _['map'](_0x453299,function(_0x2466de){_0x2466de[_0x56e5('0x2')](_0x56e5('0x3'),_0x518584);return _0x2466de;});})[_0x56e5('0x4')](function(_0x53d993){throw _0x53d993;});}module[_0x56e5('0x5')]=function(_0x4c89db){return _0x4c89db['define']('Team',attributes,{'tableName':_0x56e5('0x6'),'paranoid':![],'indexes':[],'timestamps':!![],'instanceMethods':{'getAssociatedQueues':function(){var _0x15c30c=this;var _0x5c0d00=[_0x56e5('0x7'),_0x56e5('0x8'),'Mail',_0x56e5('0x9'),_0x56e5('0xa'),_0x56e5('0xb'),_0x56e5('0xc')];return Promise[_0x56e5('0xd')]()[_0x56e5('0x1')](function(){var _0x1acff6=_[_0x56e5('0xe')](_0x5c0d00,function(_0x5cd730){return getQueuesByChannel(_0x15c30c,_0x5cd730);});return Promise['all'](_0x1acff6);})[_0x56e5('0x4')](function(_0x582f3e){throw _0x582f3e;});}}});};
\ No newline at end of file
+var _0x95a9=['Chat','Fax','Mail','Openchannel','Sms','Voice','Whatsapp','resolve','all','catch','lodash','./team.attributes','Queues','then','map','setDataValue','channel','exports','define','Team'];(function(_0x127541,_0xda3c88){var _0x4cce21=function(_0x39b5d4){while(--_0x39b5d4){_0x127541['push'](_0x127541['shift']());}};_0x4cce21(++_0xda3c88);}(_0x95a9,0x172));var _0x995a=function(_0x1a8626,_0x14f403){_0x1a8626=_0x1a8626-0x0;var _0x153526=_0x95a9[_0x1a8626];return _0x153526;};'use strict';var _=require(_0x995a('0x0'));var attributes=require(_0x995a('0x1'));function getQueuesByChannel(_0x4161f8,_0x19eabb){var _0x2f52f4='get'+_0x19eabb+_0x995a('0x2');return _0x4161f8[_0x2f52f4]()[_0x995a('0x3')](function(_0x15ff79){return _[_0x995a('0x4')](_0x15ff79,function(_0x3b6ec3){_0x3b6ec3[_0x995a('0x5')](_0x995a('0x6'),_0x19eabb);return _0x3b6ec3;});})['catch'](function(_0x571005){throw _0x571005;});}module[_0x995a('0x7')]=function(_0x586b41){return _0x586b41[_0x995a('0x8')](_0x995a('0x9'),attributes,{'tableName':'teams','paranoid':![],'indexes':[],'timestamps':!![],'instanceMethods':{'getAssociatedQueues':function(){var _0x18d907=this;var _0x3f41f1=[_0x995a('0xa'),_0x995a('0xb'),_0x995a('0xc'),_0x995a('0xd'),_0x995a('0xe'),_0x995a('0xf'),_0x995a('0x10')];return Promise[_0x995a('0x11')]()['then'](function(){var _0x4ead5a=_['map'](_0x3f41f1,function(_0x40f363){return getQueuesByChannel(_0x18d907,_0x40f363);});return Promise[_0x995a('0x12')](_0x4ead5a);})[_0x995a('0x13')](function(_0x527678){throw _0x527678;});}}});};
\ No newline at end of file