Built motion from commit 9d0783e6.|2.6.13
[motion2.git] / server / api / team / team.model.js
index 3e324ae..aeec9eb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfc65=['Voice','resolve','map','all','lodash','get','Queues','then','setDataValue','catch','exports','define','Team','teams','Mail','Sms'];(function(_0x413feb,_0x10477f){var _0x40ee88=function(_0x32a3f6){while(--_0x32a3f6){_0x413feb['push'](_0x413feb['shift']());}};_0x40ee88(++_0x10477f);}(_0xfc65,0xb4));var _0x5fc6=function(_0x322e82,_0x2a166a){_0x322e82=_0x322e82-0x0;var _0x456cc8=_0xfc65[_0x322e82];return _0x456cc8;};'use strict';var _=require(_0x5fc6('0x0'));var attributes=require('./team.attributes');function getQueuesByChannel(_0x3f61d0,_0x406295){var _0x5cac9f=_0x5fc6('0x1')+_0x406295+_0x5fc6('0x2');return _0x3f61d0[_0x5cac9f]()[_0x5fc6('0x3')](function(_0x1048df){return _['map'](_0x1048df,function(_0x4c3179){_0x4c3179[_0x5fc6('0x4')]('channel',_0x406295);return _0x4c3179;});})[_0x5fc6('0x5')](function(_0x5d91dd){throw _0x5d91dd;});}module[_0x5fc6('0x6')]=function(_0xd17016){return _0xd17016[_0x5fc6('0x7')](_0x5fc6('0x8'),attributes,{'tableName':_0x5fc6('0x9'),'paranoid':![],'indexes':[],'timestamps':!![],'instanceMethods':{'getAssociatedQueues':function(){var _0x65610d=this;var _0x394b08=['Chat','Fax',_0x5fc6('0xa'),'Openchannel',_0x5fc6('0xb'),_0x5fc6('0xc'),'Whatsapp'];return Promise[_0x5fc6('0xd')]()[_0x5fc6('0x3')](function(){var _0x331564=_[_0x5fc6('0xe')](_0x394b08,function(_0x3062fd){return getQueuesByChannel(_0x65610d,_0x3062fd);});return Promise[_0x5fc6('0xf')](_0x331564);})[_0x5fc6('0x5')](function(_0x529b28){throw _0x529b28;});}}});};
\ 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