Built motion from commit 9d0783e6.|2.6.13
[motion2.git] / server / api / team / team.model.js
index 407f371..aeec9eb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf185=['Mail','Openchannel','Sms','Voice','Whatsapp','resolve','all','catch','lodash','./team.attributes','Queues','then','map','setDataValue','channel','exports','Team','Chat','Fax'];(function(_0x50bb27,_0x5715e0){var _0x237456=function(_0x7574f5){while(--_0x7574f5){_0x50bb27['push'](_0x50bb27['shift']());}};_0x237456(++_0x5715e0);}(_0xf185,0x1bd));var _0x5f18=function(_0x2b0f13,_0x49db0d){_0x2b0f13=_0x2b0f13-0x0;var _0x5e35bb=_0xf185[_0x2b0f13];return _0x5e35bb;};'use strict';var _=require(_0x5f18('0x0'));var attributes=require(_0x5f18('0x1'));function getQueuesByChannel(_0x4763e6,_0x2ce949){var _0xfb9357='get'+_0x2ce949+_0x5f18('0x2');return _0x4763e6[_0xfb9357]()[_0x5f18('0x3')](function(_0x3e5829){return _[_0x5f18('0x4')](_0x3e5829,function(_0x78715){_0x78715[_0x5f18('0x5')](_0x5f18('0x6'),_0x2ce949);return _0x78715;});})['catch'](function(_0x220a32){throw _0x220a32;});}module[_0x5f18('0x7')]=function(_0x5475e7){return _0x5475e7['define'](_0x5f18('0x8'),attributes,{'tableName':'teams','paranoid':![],'indexes':[],'timestamps':!![],'instanceMethods':{'getAssociatedQueues':function(){var _0x2d4375=this;var _0x4f4c2a=[_0x5f18('0x9'),_0x5f18('0xa'),_0x5f18('0xb'),_0x5f18('0xc'),_0x5f18('0xd'),_0x5f18('0xe'),_0x5f18('0xf')];return Promise[_0x5f18('0x10')]()[_0x5f18('0x3')](function(){var _0x56833f=_[_0x5f18('0x4')](_0x4f4c2a,function(_0x11c1ea){return getQueuesByChannel(_0x2d4375,_0x11c1ea);});return Promise[_0x5f18('0x11')](_0x56833f);})[_0x5f18('0x12')](function(_0x330dfc){throw _0x330dfc;});}}});};
\ 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