Built motion from commit c671bd6.|0.0.103
[motion.git] / server / api / fax_account / fax_account.controller.js
index dd19950..1d8f5d0 100644 (file)
@@ -1 +1 @@
-var _0xef38=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x73\x79\x6E\x63","\x54\x72\x75\x6E\x6B","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x69\x6E\x64\x65\x78","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x6E\x61\x6D\x65","\x70\x68\x6F\x6E\x65","\x70\x65\x72\x5F\x70\x61\x67\x65","\x71\x75\x65\x72\x79","\x70\x61\x67\x65","\x6F\x72\x64\x65\x72","\x25\x73\x20\x25\x73","\x73\x6F\x72\x74\x5F\x62\x79","\x73\x6F\x72\x74\x5F\x6F\x72\x64\x65\x72","\x41\x53\x43","\x66\x6F\x72\x6D\x61\x74","\x24\x6F\x72","\x77\x68\x65\x72\x65","\x25","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x24","\x24\x6C\x69\x6B\x65","\x66\x6F\x72\x49\x6E","\x53\x6F\x6D\x65\x74\x68\x69\x6E\x67\x20\x62\x6C\x65\x77\x20\x75\x70\x21","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x63\x61\x74\x63\x68","\x63\x6F\x75\x6E\x74","\x63\x65\x69\x6C","\x6F\x66\x66\x73\x65\x74","\x25\x73\x3A\x2F\x2F\x25\x73\x25\x73\x3F\x70\x61\x67\x65\x3D\x25\x64","\x70\x72\x6F\x74\x6F\x63\x6F\x6C","\x68\x6F\x73\x74","\x68\x65\x61\x64\x65\x72\x73","\x62\x61\x73\x65\x55\x72\x6C","\x72\x6F\x77\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x63\x6F\x6E\x74\x65\x78\x74","\x47\x6F\x74\x6F","\x69\x6E\x62\x6F\x75\x6E\x64\x2D\x66\x61\x78\x2C\x73\x2C\x31","\x69\x6E\x62\x6F\x75\x6E\x64\x2D\x66\x61\x78","\x6C\x6F\x67","\x72\x6F\x6C\x6C\x62\x61\x63\x6B","\x6F\x6B","\x63\x6F\x6D\x6D\x69\x74","\x77\x61\x74\x65\x72\x66\x61\x6C\x6C","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x66\x69\x6E\x64\x4F\x6E\x65","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x76\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x20\x65\x64\x69\x74\x65\x64","\x55\x73\x65\x72\x49\x64","\x6D\x65\x72\x67\x65","\x66\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x20\x73\x61\x76\x65\x64","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x66\x69\x6E\x64","\x61\x64\x64\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x6C\x65\x6E\x67\x74\x68","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x70\x72\x69\x6F\x72\x69\x74\x79","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79"];_0xef38[0];var _=require(_0xef38[1]);var util=require(_0xef38[2]);var async=require(_0xef38[3]);var Trunk=require(_0xef38[5])[_0xef38[4]];var FaxAccount=require(_0xef38[5])[_0xef38[6]];var FaxApplication=require(_0xef38[5])[_0xef38[7]];var VoiceExtension=require(_0xef38[5])[_0xef38[8]];var sequelize=require(_0xef38[5])[_0xef38[9]];exports[_0xef38[10]]=function(_0xbb16x9,_0xbb16xa,_0xbb16xb){var _0xbb16xc=[_0xef38[11],_0xef38[12],_0xef38[13]];var _0xbb16xd=_0xbb16x9[_0xef38[15]][_0xef38[14]]?parseInt(_0xbb16x9[_0xef38[15]][_0xef38[14]],10):100;var _0xbb16xe=_0xbb16x9[_0xef38[15]][_0xef38[16]]?parseInt(_0xbb16x9[_0xef38[15]][_0xef38[16]],10):0;var _0xbb16xf={where:{},limit:_0xbb16xd,offset:_0xbb16xe*_0xbb16xd};_[_0xef38[30]](_0xbb16x9[_0xef38[15]],function(_0xbb16x10,_0xbb16x11){switch(_0xbb16x11){case _0xef38[14]:;case _0xef38[16]:break ;;case _0xef38[19]:_0xbb16xf[_0xef38[17]]=util[_0xef38[22]](_0xef38[18],_0xbb16x9[_0xef38[15]][_0xef38[19]],_0xbb16x9[_0xef38[15]][_0xef38[20]]||_0xef38[21])||null;break ;;case _0xef38[20]:break ;;case _0xef38[28]:_0xbb16xf[_0xef38[24]][_0xef38[23]]=[];_0xbb16xc[_0xef38[27]](function(_0xbb16x12){var _0xbb16x13={};_0xbb16x13[_0xbb16x12]={$like:_0xef38[25]+_0xbb16x10+_0xef38[25]};_0xbb16xf[_0xef38[24]][_0xef38[23]][_0xef38[26]](_0xbb16x13);});break ;;default:_0xbb16xf[_0xef38[24]][_0xbb16x11]={$like:{}};_0xbb16xf[_0xef38[24]][_0xbb16x11][_0xef38[29]]=_0xef38[25]+_0xbb16x10+_0xef38[25];;}});FaxAccount[_0xef38[45]](_0xbb16xf)[_0xef38[44]](function(_0xbb16x15){var _0xbb16x16=Math[_0xef38[36]](_0xbb16x15[_0xef38[35]]/_0xbb16xd);var _0xbb16x17=_0xbb16x16>(_0xbb16xf[_0xef38[37]]+1)?util[_0xef38[22]](_0xef38[38],_0xbb16x9[_0xef38[39]],_0xbb16x9[_0xef38[41]][_0xef38[40]],_0xbb16x9[_0xef38[42]],_0xbb16xe+1):null;var _0xbb16x18=_0xbb16xe>0?util[_0xef38[22]](_0xef38[38],_0xbb16x9[_0xef38[39]],_0xbb16x9[_0xef38[41]][_0xef38[40]],_0xbb16x9[_0xef38[42]],_0xbb16xe-1):null;_0xbb16xa[_0xef38[33]](200)[_0xef38[32]]({count:_0xbb16x15[_0xef38[35]],rows:_0xbb16x15[_0xef38[43]],next_page:_0xbb16x17,previous_page:_0xbb16x18,total_pages:_0xbb16x16});})[_0xef38[34]](function(_0xbb16x14){_0xbb16xa[_0xef38[33]](500)[_0xef38[32]]({error:_0xef38[31]})});};exports[_0xef38[46]]=function(_0xbb16x9,_0xbb16xa,_0xbb16xb){FaxAccount[_0xef38[50]](_0xbb16x9[_0xef38[49]][_0xef38[48]])[_0xef38[44]](function(_0xbb16x19){if(!_0xbb16x19){return _0xbb16xa[_0xef38[47]](404)};return _0xbb16xa[_0xef38[32]](_0xbb16x19);})[_0xef38[34]](function(_0xbb16x14){return _0xbb16xb(_0xbb16x14)})};exports[_0xef38[51]]=function(_0xbb16x9,_0xbb16xa,_0xbb16xb){return sequelize[_0xef38[62]]()[_0xef38[44]](function(_0xbb16x1a){async[_0xef38[61]]([function(_0xbb16x1b){return FaxAccount[_0xef38[51]](_0xbb16x9[_0xef38[52]],{transaction:_0xbb16x1a})[_0xef38[44]](function(_0xbb16x19){_0xbb16x1b(null,_0xbb16x19)})[_0xef38[34]](function(_0xbb16x14){_0xbb16x1b(_0xbb16x14)})},function(_0xbb16x19,_0xbb16x1b){return Trunk[_0xef38[50]](_0xbb16x9[_0xef38[52]].TrunkId,{transaction:_0xbb16x1a})[_0xef38[44]](function(_0xbb16x1c){_0xbb16x1b(null,_0xbb16x19,_0xbb16x1c)})[_0xef38[34]](function(_0xbb16x14){_0xbb16x1b(_0xbb16x14)})},function(_0xbb16x19,_0xbb16x1c,_0xbb16x1b){return VoiceExtension[_0xef38[51]]({context:_0xbb16x1c[_0xef38[53]],exten:_0xbb16x9[_0xef38[52]][_0xef38[13]],priority:1,app:_0xef38[54],appdata:_0xef38[55],type:_0xef38[56],TrunkId:_0xbb16x1c[_0xef38[48]]},{transaction:_0xbb16x1a})[_0xef38[44]](function(_0xbb16x1d){_0xbb16x1b(null,_0xbb16x19)})[_0xef38[34]](function(_0xbb16x14){_0xbb16x1b(_0xbb16x14)})}],function(_0xbb16x14,_0xbb16x19){if(_0xbb16x14){console[_0xef38[57]](_0xbb16x14);_0xbb16x1a[_0xef38[58]]();return _0xbb16xa[_0xef38[33]](404)[_0xef38[32]](_0xbb16x14);}else {console[_0xef38[57]](_0xef38[59]);_0xbb16x1a[_0xef38[60]]();return _0xbb16xa[_0xef38[33]](201)[_0xef38[32]](_0xbb16x19);}})})};exports[_0xef38[63]]=function(_0xbb16x9,_0xbb16xa,_0xbb16xb){if(_0xbb16x9[_0xef38[52]][_0xef38[48]]){delete _0xbb16x9[_0xef38[52]][_0xef38[48]]};return sequelize[_0xef38[62]]()[_0xef38[44]](function(_0xbb16x1a){async[_0xef38[61]]([function(_0xbb16x1b){return FaxAccount[_0xef38[64]]({where:{id:_0xbb16x9[_0xef38[49]][_0xef38[48]]},include:[{model:Trunk}]},{transaction:_0xbb16x1a})[_0xef38[44]](function(_0xbb16x19){_0xbb16x1b(null,_0xbb16x19)})[_0xef38[34]](function(_0xbb16x14){_0xbb16x1b(_0xbb16x14)})},function(_0xbb16x19,_0xbb16x1b){return Trunk[_0xef38[50]](_0xbb16x9[_0xef38[52]].TrunkId,{transaction:_0xbb16x1a})[_0xef38[44]](function(_0xbb16x1e){return _0xbb16x19[_0xef38[65]]({TrunkId:_0xbb16x1e[_0xef38[48]]},{transaction:_0xbb16x1a})[_0xef38[44]](function(_0xbb16x1f){_0xbb16x1b(null,_0xbb16x19,_0xbb16x1e)})[_0xef38[34]](function(_0xbb16x14){_0xbb16x1b(_0xbb16x14)})})[_0xef38[34]](function(_0xbb16x14){_0xbb16x1b(_0xbb16x14)})},function(_0xbb16x19,_0xbb16x1e,_0xbb16x1b){return VoiceExtension[_0xef38[64]]({where:{priority:1,exten:_0xbb16x19[_0xef38[13]],context:_0xbb16x19[_0xef38[4]][_0xef38[53]]}},{transaction:_0xbb16x1a})[_0xef38[44]](function(_0xbb16x1d){if(!_0xbb16x1d){_0xbb16x1b(null,_0xbb16x19)};return _0xbb16x1d[_0xef38[65]]({exten:_0xbb16x9[_0xef38[52]][_0xef38[13]],context:_0xbb16x1e[_0xef38[53]],TrunkId:_0xbb16x9[_0xef38[52]][_0xef38[67]]},{transaction:_0xbb16x1a})[_0xef38[44]](function(){console[_0xef38[57]](_0xef38[66]);_0xbb16x1b(null,_0xbb16x19);})[_0xef38[34]](function(_0xbb16x14){_0xbb16x1b(_0xbb16x14)});})[_0xef38[34]](function(_0xbb16x14){_0xbb16x1b(_0xbb16x14)})},function(_0xbb16x19,_0xbb16x1b){var _0xbb16x20=_[_0xef38[68]](_0xbb16x19,_0xbb16x9[_0xef38[52]]);return _0xbb16x20[_0xef38[70]]({transaction:_0xbb16x1a})[_0xef38[44]](function(){console[_0xef38[57]](_0xef38[69]);_0xbb16x1b(null,_0xbb16x19);})[_0xef38[34]](function(_0xbb16x14){_0xbb16x1b(_0xbb16x14)});}],function(_0xbb16x14,_0xbb16x19){if(_0xbb16x14){console[_0xef38[57]](_0xbb16x14);_0xbb16x1a[_0xef38[58]]();return _0xbb16xa[_0xef38[33]](404)[_0xef38[32]](_0xbb16x14);}else {console[_0xef38[57]](_0xef38[59]);_0xbb16x1a[_0xef38[60]]();return _0xbb16xa[_0xef38[33]](201)[_0xef38[32]](_0xbb16x19);}})});};exports[_0xef38[71]]=function(_0xbb16x9,_0xbb16xa,_0xbb16xb){FaxAccount[_0xef38[72]]({where:{id:_0xbb16x9[_0xef38[49]][_0xef38[48]]}})[_0xef38[44]](function(_0xbb16x19){if(!_0xbb16x19){return _0xbb16xa[_0xef38[47]](404)};_0xbb16x19[_0xef38[71]]()[_0xef38[44]](function(){return _0xbb16xa[_0xef38[47]](204)})[_0xef38[34]](function(_0xbb16x14){_0xbb16xb(_0xbb16x14)});})[_0xef38[34]](function(_0xbb16x14){_0xbb16xb(_0xbb16x14)})};exports[_0xef38[73]]=function(_0xbb16x9,_0xbb16xa,_0xbb16xb){FaxApplication[_0xef38[79]]({where:{id:_0xbb16x9[_0xef38[52]][_0xef38[75]]}})[_0xef38[44]](function(_0xbb16x21){var _0xbb16x22=_0xbb16x21;return sequelize[_0xef38[62]](function(_0xbb16x1a){return FaxApplication[_0xef38[71]]({where:{id:_0xbb16x9[_0xef38[52]][_0xef38[75]]}},{transaction:_0xbb16x1a})[_0xef38[44]](function(){var _0xbb16x23=[];for(var _0xbb16x24=0;_0xbb16x24<_0xbb16x9[_0xef38[52]][_0xef38[75]][_0xef38[74]];_0xbb16x24++){var _0xbb16x25=_[_0xef38[72]](_0xbb16x22,{"\x69\x64":_0xbb16x9[_0xef38[52]][_0xef38[75]][_0xbb16x24]});if(_0xbb16x25){_0xbb16x25[_0xef38[76]]=_0xbb16x24+1;_0xbb16x23[_0xef38[26]](_0xbb16x25[_0xef38[77]]);};};return FaxApplication[_0xef38[78]](_0xbb16x23,{transaction:_0xbb16x1a})[_0xef38[44]](function(_0xbb16x1f){return _0xbb16x1f});})})[_0xef38[44]](function(_0xbb16x15){return _0xbb16xa[_0xef38[33]](200)[_0xef38[32]](_0xbb16x15)})[_0xef38[34]](function(_0xbb16x14){return handleError(_0xbb16xa,_0xbb16x14)});})[_0xef38[34]](function(_0xbb16x14){return _0xbb16xb(_0xbb16x14)})};exports[_0xef38[80]]=function(_0xbb16x9,_0xbb16xa){FaxAccount[_0xef38[71]]({where:{id:_0xbb16x9[_0xef38[15]][_0xef38[48]]},individualHooks:true})[_0xef38[44]](function(){return _0xbb16xa[_0xef38[47]](204)})[_0xef38[34]](function(_0xbb16x14){return handleError(_0xbb16xa,_0xbb16x14)})};function handleError(_0xbb16xa,_0xbb16x14){return _0xbb16xa[_0xef38[33]](500)[_0xef38[32]](_0xbb16x14)}
\ No newline at end of file
+var _0x6670=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x46\x61\x78\x52\x6F\x6F\x6D","\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x46\x61\x78\x51\x75\x65\x75\x65","\x55\x73\x65\x72","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x68\x61\x6E\x64\x6C\x65\x55\x6E\x69\x71\x75\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x65\x72\x72\x6F\x72\x4D\x61\x6E\x61\x67\x65\x72","\x6D\x65\x73\x73\x61\x67\x65","\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x2F\x63\x6F\x6E\x74\x65\x78\x74\x20\x63\x6F\x6D\x62\x69\x6E\x61\x74\x69\x6F\x6E\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x65\x78\x69\x73\x74","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x64\x4D\x65\x73\x73\x61\x67\x65","\x4D\x45\x53\x53\x41\x47\x45\x5F\x45\x58\x49\x53\x54\x5F\x52\x4F\x55\x54\x45","\x62\x6F\x64\x79","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x73\x68\x6F\x77\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x61\x6D\x65","\x6F\x6E\x6C\x69\x6E\x65","\x6D\x65\x72\x67\x65","\x67\x65\x74\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x64\x65\x66\x61\x75\x6C\x74","\x73\x63\x6F\x70\x65","\x63\x72\x65\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x70\x72\x69\x6F\x72\x69\x74\x79","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x6D\x61\x78","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x64\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x61\x70\x70\x49\x64","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x66\x6F\x72\x45\x61\x63\x68","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x73\x68\x6F\x77\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x67\x65\x74\x46\x61\x78\x52\x6F\x6F\x6D\x73","\x66\x72\x6F\x6D","\x6C\x61\x73\x74\x45\x76\x65\x6E\x74","\x74\x61\x67\x73","\x69\x73\x41\x72\x72\x61\x79","\x25","\x70\x75\x73\x68","\x24\x61\x6E\x64","\x77\x68\x65\x72\x65","\x55\x4E\x4D\x41\x4E\x41\x47\x45\x44","\x69\x6E\x63\x6C\x75\x64\x65","\x75\x73\x65\x72","\x61\x67\x65\x6E\x74","\x72\x6F\x6C\x65","\x6C\x6F\x67","\x66\x69\x6E\x64\x41\x6C\x6C"];_0x6670[0];var _=require(_0x6670[1]);var Util=require(_0x6670[2]);var sequelize=require(_0x6670[4])[_0x6670[3]];var FaxAccount=require(_0x6670[4])[_0x6670[5]];var FaxRoom=require(_0x6670[4])[_0x6670[6]];var FaxApplication=require(_0x6670[4])[_0x6670[7]];var FaxQueue=require(_0x6670[4])[_0x6670[8]];var User=require(_0x6670[4])[_0x6670[9]];function handleError(_0x7549xa,_0x7549xb){_0x7549xb=_0x7549xb||500;return function(_0x7549xc){_0x7549xa[_0x6670[11]](_0x7549xb)[_0x6670[10]](_0x7549xc)}}function responseWithResult(_0x7549xa,_0x7549xb){_0x7549xb=_0x7549xb||200;return function(_0x7549xe){if(_0x7549xe){_0x7549xa[_0x6670[11]](_0x7549xb)[_0x6670[12]](_0x7549xe)}}}function responseWithoutResult(_0x7549xa,_0x7549xb){_0x7549xb=_0x7549xb||204;return function(){_0x7549xa[_0x6670[13]](_0x7549xb)}}function handleEntityNotFound(_0x7549xa){return function(_0x7549xe){if(!_0x7549xe){_0x7549xa[_0x6670[11]](404)[_0x6670[14]]();return null};return _0x7549xe}}function saveUpdates(_0x7549x12){return function(_0x7549xe){return _0x7549xe[_0x6670[16]](_0x7549x12)[_0x6670[15]](function(_0x7549x13){return _0x7549x13})}}function removeEntity(_0x7549xa){return function(_0x7549xe){if(_0x7549xe){return _0x7549xe[_0x6670[17]]()[_0x6670[15]](function(){_0x7549xa[_0x6670[11]](204)[_0x6670[14]]()})}}}exports[_0x6670[18]]=function(_0x7549x15,_0x7549xa){return FaxAccount[_0x6670[22]](Util[_0x6670[21]](_0x7549x15[_0x6670[20]]))[_0x6670[15]](responseWithResult(_0x7549xa))[_0x6670[19]](handleError(_0x7549xa))};exports[_0x6670[23]]=function(_0x7549x15,_0x7549xa){return FaxAccount[_0x6670[26]](_0x7549x15[_0x6670[25]][_0x6670[24]])[_0x6670[15]](handleEntityNotFound(_0x7549xa))[_0x6670[15]](responseWithResult(_0x7549xa))[_0x6670[19]](handleError(_0x7549xa))};exports[_0x6670[27]]=function(_0x7549x15,_0x7549xa){return sequelize[_0x6670[35]](function(_0x7549x16){return FaxAccount[_0x6670[27]](_0x7549x15[_0x6670[34]],{transaction:_0x7549x16})})[_0x6670[15]](responseWithoutResult(_0x7549xa,201))[_0x6670[19]](sequelize.ValidationError,function(_0x7549xc){_0x7549xc[_0x6670[30]]=_0x6670[31];_0x7549xc[_0x6670[32]]=_0x6670[33];return _0x7549xa[_0x6670[11]](500)[_0x6670[10]](_0x7549xc)})[_0x6670[19]](sequelize.UniqueConstraintError,function(_0x7549xc){return Util[_0x6670[29]][_0x6670[28]](_0x7549xa,_0x7549xc)})[_0x6670[19]](handleError(_0x7549xa))};exports[_0x6670[36]]=function(_0x7549x15,_0x7549xa){if(_0x7549x15[_0x6670[34]][_0x6670[24]]){delete _0x7549x15[_0x6670[34]][_0x6670[24]]};return sequelize[_0x6670[35]](function(_0x7549x16){return FaxAccount[_0x6670[26]](_0x7549x15[_0x6670[25]][_0x6670[24]])[_0x6670[15]](handleEntityNotFound(_0x7549xa))[_0x6670[15]](function(_0x7549x17){return _0x7549x17[_0x6670[16]](_0x7549x15[_0x6670[34]],{transaction:_0x7549x16})})})[_0x6670[15]](responseWithoutResult(_0x7549xa))[_0x6670[19]](sequelize.ValidationError,function(_0x7549xc){_0x7549xc[_0x6670[30]]=_0x6670[31];_0x7549xc[_0x6670[32]]=_0x6670[33];return _0x7549xa[_0x6670[11]](500)[_0x6670[10]](_0x7549xc)})[_0x6670[19]](sequelize.UniqueConstraintError,function(_0x7549xc){return Util[_0x6670[29]][_0x6670[28]](_0x7549xa,_0x7549xc)})[_0x6670[19]](handleError(_0x7549xa))};exports[_0x6670[17]]=function(_0x7549x15,_0x7549xa){return sequelize[_0x6670[35]](function(_0x7549x16){return FaxAccount[_0x6670[26]](_0x7549x15[_0x6670[25]][_0x6670[24]])[_0x6670[15]](handleEntityNotFound(_0x7549xa))[_0x6670[15]](function(_0x7549x17){return _0x7549x17[_0x6670[17]]()})})[_0x6670[15]](function(){_0x7549xa[_0x6670[11]](204)[_0x6670[14]]()})[_0x6670[19]](handleError(_0x7549xa))};exports[_0x6670[37]]=function(_0x7549x15,_0x7549xa){return FaxAccount[_0x6670[17]]({where:{id:_0x7549x15[_0x6670[20]][_0x6670[38]]},individualHooks:true})[_0x6670[15]](responseWithoutResult(_0x7549xa))[_0x6670[19]](handleError(_0x7549xa))};exports[_0x6670[39]]=function(_0x7549x15,_0x7549xa,_0x7549x18){return FaxAccount[_0x6670[46]](_0x6670[45])[_0x6670[26]](_0x7549x15[_0x6670[25]][_0x6670[24]])[_0x6670[15]](handleEntityNotFound(_0x7549xa))[_0x6670[15]](function(_0x7549x17){return _0x7549x17[_0x6670[44]](_[_0x6670[43]](Util[_0x6670[21]](_0x7549x15[_0x6670[20]]),{include:[{model:FaxQueue,attributes:[_0x6670[24],_0x6670[41]]},{model:User,attributes:[_0x6670[24],_0x6670[41],_0x6670[42]]}]}))})[_0x6670[15]](function(_0x7549x19){return _0x7549xa[_0x6670[10]]({count:_0x7549x19[_0x6670[40]],rows:_0x7549x19})})[_0x6670[19]](handleError(_0x7549xa))};exports[_0x6670[47]]=function(_0x7549x15,_0x7549xa,_0x7549x18){return FaxApplication[_0x6670[50]](_0x6670[48],{where:{FaxAccountId:_0x7549x15[_0x6670[25]][_0x6670[24]]}})[_0x6670[15]](function(_0x7549x1a){_0x7549x15[_0x6670[34]][_0x6670[48]]=_0x7549x1a?++_0x7549x1a:1;_0x7549x15[_0x6670[34]][_0x6670[49]]=_0x7549x15[_0x6670[25]][_0x6670[24]];return FaxApplication[_0x6670[27]](_0x7549x15[_0x6670[34]])})[_0x6670[15]](responseWithResult(_0x7549xa,201))[_0x6670[19]](handleError(_0x7549xa))};exports[_0x6670[51]]=function(_0x7549x15,_0x7549xa){return FaxApplication[_0x6670[17]]({where:{id:_0x7549x15[_0x6670[20]][_0x6670[38]]},individualHooks:true})[_0x6670[15]](responseWithoutResult(_0x7549xa))[_0x6670[19]](handleError(_0x7549xa))};exports[_0x6670[52]]=function(_0x7549x15,_0x7549xa,_0x7549x18){return FaxApplication[_0x6670[26]](_0x7549x15[_0x6670[25]][_0x6670[53]])[_0x6670[15]](handleEntityNotFound(_0x7549xa))[_0x6670[15]](removeEntity(_0x7549xa))[_0x6670[19]](handleError(_0x7549xa))};exports[_0x6670[54]]=function(_0x7549x15,_0x7549xa){var _0x7549x1b=0;var _0x7549x1c=_0x7549x15[_0x6670[34]];_0x7549x1c[_0x6670[57]](function(_0x7549x1d){delete _0x7549x1d[_0x6670[24]];delete _0x7549x1d[_0x6670[55]];delete _0x7549x1d[_0x6670[56]];_0x7549x1d[_0x6670[48]]= ++_0x7549x1b});return sequelize[_0x6670[35]](function(_0x7549x16){return FaxApplication[_0x6670[17]]({where:{FaxAccountId:_0x7549x15[_0x6670[25]][_0x6670[24]]},individualHooks:true,transaction:_0x7549x16})[_0x6670[15]](function(_0x7549x1e){return FaxApplication[_0x6670[58]](_0x7549x1c,{individualHooks:true,transaction:_0x7549x16})})})[_0x6670[15]](function(_0x7549x19){return _0x7549xa[_0x6670[11]](200)[_0x6670[10]]({count:_0x7549x19[_0x6670[40]],rows:_0x7549x19})})[_0x6670[19]](handleError(_0x7549xa))};exports[_0x6670[59]]=function(_0x7549x15,_0x7549xa){if(_0x7549x15[_0x6670[34]][_0x6670[24]]){delete _0x7549x15[_0x6670[34]][_0x6670[24]]};return FaxApplication[_0x6670[26]](_0x7549x15[_0x6670[25]][_0x6670[53]])[_0x6670[15]](handleEntityNotFound(_0x7549xa))[_0x6670[15]](saveUpdates(_0x7549x15[_0x6670[34]]))[_0x6670[15]](responseWithResult(_0x7549xa))[_0x6670[19]](handleError(_0x7549xa))};exports[_0x6670[60]]=function(_0x7549x15,_0x7549xa){return FaxApplication[_0x6670[26]](_0x7549x15[_0x6670[25]][_0x6670[53]],{include:[{all:true}]})[_0x6670[15]](handleEntityNotFound(_0x7549xa))[_0x6670[15]](responseWithResult(_0x7549xa))[_0x6670[19]](handleError(_0x7549xa))};exports[_0x6670[61]]=function(_0x7549x15,_0x7549xa,_0x7549x18){var _0x7549x1f={where:{FaxAccountId:_0x7549x15[_0x6670[25]][_0x6670[24]],$and:[]},attributes:[_0x6670[24],_0x6670[62],_0x6670[63],_0x6670[56]]};if(_0x7549x15[_0x6670[20]]){if(_0x7549x15[_0x6670[20]][_0x6670[64]]){if(_[_0x6670[65]](_0x7549x15[_0x6670[20]][_0x6670[64]])){for(var _0x7549x20=0;_0x7549x20<_0x7549x15[_0x6670[20]][_0x6670[64]][_0x6670[40]];_0x7549x20++){_0x7549x1f[_0x6670[69]][_0x6670[68]][_0x6670[67]]({tags:{$like:_0x6670[66]+_0x7549x15[_0x6670[20]][_0x6670[64]][_0x7549x20]+_0x6670[66]}})}}else {_0x7549x1f[_0x6670[69]][_0x6670[68]][_0x6670[67]]({tags:{$like:_0x6670[66]+_0x7549x15[_0x6670[20]][_0x6670[64]]+_0x6670[66]}})};delete _0x7549x15[_0x6670[20]][_0x6670[64]]};_[_0x6670[43]](_0x7549x1f[_0x6670[69]],_0x7549x15[_0x6670[20]])};switch(_0x7549x15[_0x6670[72]][_0x6670[74]]){case _0x6670[73]:if(_0x7549x15[_0x6670[20]][_0x6670[11]]&&_0x7549x15[_0x6670[20]][_0x6670[11]]!==_0x6670[70]){_0x7549x1f[_0x6670[71]]=[{model:User,where:{id:_0x7549x15[_0x6670[72]][_0x6670[24]]}}]};break;default:};console[_0x6670[75]](_0x6670[20],_0x7549x1f);return FaxRoom[_0x6670[76]](_0x7549x1f)[_0x6670[15]](function(_0x7549x21){return _0x7549xa[_0x6670[11]](200)[_0x6670[10]](_0x7549x21)})[_0x6670[19]](handleError(_0x7549xa))}
\ No newline at end of file