Built motion from commit 6a5ce012e.|1.0.35
[motion.git] / server / api / desk_account / desk_account.controller.js
index c4ba019..45b4015 100644 (file)
@@ -1 +1 @@
-var _0xf734=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x64\x65\x73\x6B\x2E\x6A\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x6E\x61\x6D\x65","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\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","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x63\x68\x65\x63\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x61\x75\x74\x68\x54\x79\x70\x65","\x62\x61\x73\x69\x63","\x70\x61\x73\x73\x77\x6F\x72\x64","\x6F\x61\x75\x74\x68","\x63\x6F\x6E\x73\x75\x6D\x65\x72\x4B\x65\x79","\x63\x6F\x6E\x73\x75\x6D\x65\x72\x53\x65\x63\x72\x65\x74","\x74\x6F\x6B\x65\x6E","\x74\x6F\x6B\x65\x6E\x53\x65\x63\x72\x65\x74","\x63\x72\x65\x61\x74\x65\x43\x6C\x69\x65\x6E\x74","\x2F\x61\x70\x69\x2F\x76\x32\x2F\x75\x73\x65\x72\x73\x2F\x6D\x65","\x67\x65\x74","\x64\x65\x73\x6B\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x66\x69\x65\x6C\x64","\x76\x61\x6C\x75\x65","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x2F\x61\x70\x69\x2F\x76\x32\x2F\x63\x75\x73\x74\x6F\x6D\x5F\x66\x69\x65\x6C\x64\x73","\x65\x6E\x74\x72\x69\x65\x73","\x5F\x65\x6D\x62\x65\x64\x64\x65\x64","\x6A\x73\x6F\x6E","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x73\x75\x62\x73\x74\x72","\x2F","\x6C\x65\x6E\x67\x74\x68","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72"];_0xf734[0];var _=require(_0xf734[1]);var util=require(_0xf734[2]);var desk=require(_0xf734[3]);var logger=require(_0xf734[5])(_0xf734[4]);var DeskAccount=require(_0xf734[7])[_0xf734[6]];exports[_0xf734[8]]= function(_0x34a3x6,_0x34a3x7){var _0x34a3x8=[_0xf734[9],_0xf734[10],_0xf734[11],_0xf734[12]];var _0x34a3x9=_0x34a3x6[_0xf734[14]][_0xf734[13]]?parseInt(_0x34a3x6[_0xf734[14]][_0xf734[13]],10):100;var _0x34a3xa=_0x34a3x6[_0xf734[14]][_0xf734[15]]?parseInt(_0x34a3x6[_0xf734[14]][_0xf734[15]],10):0;var _0x34a3xb={where:{},limit:_0x34a3x9,offset:_0x34a3xa* _0x34a3x9};_[_0xf734[29]](_0x34a3x6[_0xf734[14]],function(_0x34a3xc,_0x34a3xd){switch(_0x34a3xd){case _0xf734[13]:;case _0xf734[15]:break;case _0xf734[18]:_0x34a3xb[_0xf734[16]]= util[_0xf734[21]](_0xf734[17],_0x34a3x6[_0xf734[14]][_0xf734[18]],_0x34a3x6[_0xf734[14]][_0xf734[19]]|| _0xf734[20])|| null;break;case _0xf734[19]:break;case _0xf734[27]:_0x34a3xb[_0xf734[23]][_0xf734[22]]= [];_0x34a3x8[_0xf734[26]](function(_0x34a3xe){var _0x34a3xf={};_0x34a3xf[_0x34a3xe]= {$like:_0xf734[24]+ _0x34a3xc+ _0xf734[24]};_0x34a3xb[_0xf734[23]][_0xf734[22]][_0xf734[25]](_0x34a3xf)});break;default:_0x34a3xb[_0xf734[23]][_0x34a3xd]= {$like:{}};_0x34a3xb[_0xf734[23]][_0x34a3xd][_0xf734[28]]= _0xf734[24]+ _0x34a3xc+ _0xf734[24]}});return DeskAccount[_0xf734[44]](_0x34a3xb)[_0xf734[43]](function(_0x34a3x11){var _0x34a3x12=Math[_0xf734[35]](_0x34a3x11[_0xf734[34]]/ _0x34a3x9);var _0x34a3x13=_0x34a3x12> (_0x34a3xb[_0xf734[36]]+ 1)?util[_0xf734[21]](_0xf734[37],_0x34a3x6[_0xf734[38]],_0x34a3x6[_0xf734[40]][_0xf734[39]],_0x34a3x6[_0xf734[41]],_0x34a3xa+ 1):null;var _0x34a3x14=_0x34a3xa> 0?util[_0xf734[21]](_0xf734[37],_0x34a3x6[_0xf734[38]],_0x34a3x6[_0xf734[40]][_0xf734[39]],_0x34a3x6[_0xf734[41]],_0x34a3xa- 1):null;return _0x34a3x7[_0xf734[32]](200)[_0xf734[31]]({count:_0x34a3x11[_0xf734[34]],rows:_0x34a3x11[_0xf734[42]],next_page:_0x34a3x13,previous_page:_0x34a3x14,total_pages:_0x34a3x12})})[_0xf734[33]](function(_0x34a3x10){return _0x34a3x7[_0xf734[32]](500)[_0xf734[31]]({error:_0xf734[30]})})};exports[_0xf734[45]]= function(_0x34a3x6,_0x34a3x7){DeskAccount[_0xf734[49]](_0x34a3x6[_0xf734[48]][_0xf734[47]])[_0xf734[43]](function(_0x34a3x15){if(!_0x34a3x15){return _0x34a3x7[_0xf734[46]](404)};return _0x34a3x7[_0xf734[31]](_0x34a3x15)})[_0xf734[33]](function(_0x34a3x10){return handleError(_0x34a3x7,_0x34a3x10)})};exports[_0xf734[50]]= function(_0x34a3x6,_0x34a3x7,_0x34a3x16){DeskAccount[_0xf734[50]](_0x34a3x6[_0xf734[51]])[_0xf734[43]](function(_0x34a3x15){return _0x34a3x7[_0xf734[32]](201)[_0xf734[31]](_0x34a3x15)})[_0xf734[33]](function(_0x34a3x10){return handleError(_0x34a3x7,_0x34a3x10)})};exports[_0xf734[52]]= function(_0x34a3x6,_0x34a3x7){if(_0x34a3x6[_0xf734[51]][_0xf734[47]]){delete _0x34a3x6[_0xf734[51]][_0xf734[47]]};DeskAccount[_0xf734[49]](_0x34a3x6[_0xf734[48]][_0xf734[47]])[_0xf734[43]](function(_0x34a3x15){if(!_0x34a3x15){return _0x34a3x7[_0xf734[46]](404)};var _0x34a3x17=_[_0xf734[53]](_0x34a3x15,_0x34a3x6[_0xf734[51]]);_0x34a3x17[_0xf734[54]]()[_0xf734[43]](function(){return _0x34a3x7[_0xf734[32]](200)[_0xf734[31]](_0x34a3x15)})[_0xf734[33]](function(_0x34a3x10){return handleError(_0x34a3x7,_0x34a3x10)})})[_0xf734[33]](function(_0x34a3x10){return handleError(_0x34a3x7,_0x34a3x10)})};exports[_0xf734[55]]= function(_0x34a3x6,_0x34a3x7){DeskAccount[_0xf734[49]](_0x34a3x6[_0xf734[48]][_0xf734[47]])[_0xf734[43]](function(_0x34a3x15){if(!_0x34a3x15){return _0x34a3x7[_0xf734[46]](404)};_0x34a3x15[_0xf734[55]]()[_0xf734[43]](function(){return _0x34a3x7[_0xf734[46]](204)})[_0xf734[33]](function(_0x34a3x10){return handleError(_0x34a3x7,_0x34a3x10)})})[_0xf734[33]](function(_0x34a3x10){return handleError(_0x34a3x7,_0x34a3x10)})};exports[_0xf734[56]]= function(_0x34a3x6,_0x34a3x7){DeskAccount[_0xf734[49]](_0x34a3x6[_0xf734[48]][_0xf734[47]])[_0xf734[43]](function(_0x34a3x18){var _0x34a3x15={endpoint:stripTrailingSlash(_0x34a3x18[_0xf734[12]]),retry:false};if(_0x34a3x18[_0xf734[57]]=== _0xf734[58]){_0x34a3x15[_0xf734[11]]= _0x34a3x18[_0xf734[11]];_0x34a3x15[_0xf734[59]]= _0x34a3x18[_0xf734[59]]}else {if(_0x34a3x18[_0xf734[57]]=== _0xf734[60]){_0x34a3x15[_0xf734[61]]= _0x34a3x18[_0xf734[61]];_0x34a3x15[_0xf734[62]]= _0x34a3x18[_0xf734[62]];_0x34a3x15[_0xf734[63]]= _0x34a3x18[_0xf734[63]];_0x34a3x15[_0xf734[64]]= _0x34a3x18[_0xf734[64]]}};var _0x34a3x19=desk[_0xf734[65]](_0x34a3x15);_0x34a3x19[_0xf734[67]](_0xf734[66],function(_0x34a3x10,_0x34a3x1a,_0x34a3x1b){if(_0x34a3x10){return handleError(_0x34a3x7,_0x34a3x10)};return _0x34a3x7[_0xf734[46]](200)})})[_0xf734[33]](function(_0x34a3x10){return handleError(_0x34a3x7,_0x34a3x10)})};exports[_0xf734[68]]= function(_0x34a3x6,_0x34a3x7){var _0x34a3x1c={};_0x34a3x1c[_0x34a3x6[_0xf734[48]][_0xf734[69]]]= _0x34a3x6[_0xf734[51]][_0xf734[70]];DeskAccount[_0xf734[44]]({where:_0x34a3x1c})[_0xf734[43]](function(_0x34a3x11){if(_0x34a3x11[_0xf734[34]]){return _0x34a3x7[_0xf734[32]](200)[_0xf734[31]]({isValid:false,value:_0x34a3x6[_0xf734[51]][_0xf734[70]]})};return _0x34a3x7[_0xf734[32]](200)[_0xf734[31]]({isValid:true,value:_0x34a3x6[_0xf734[51]][_0xf734[70]]})})[_0xf734[33]](function(_0x34a3x10){return handleError(_0x34a3x7,_0x34a3x10)})};exports[_0xf734[71]]= function(_0x34a3x6,_0x34a3x7){DeskAccount[_0xf734[49]](_0x34a3x6[_0xf734[48]][_0xf734[47]])[_0xf734[43]](function(_0x34a3x18){var _0x34a3x15={endpoint:stripTrailingSlash(_0x34a3x18[_0xf734[12]]),retry:false};if(_0x34a3x18[_0xf734[57]]=== _0xf734[58]){_0x34a3x15[_0xf734[11]]= _0x34a3x18[_0xf734[11]];_0x34a3x15[_0xf734[59]]= _0x34a3x18[_0xf734[59]]}else {if(_0x34a3x18[_0xf734[57]]=== _0xf734[60]){_0x34a3x15[_0xf734[61]]= _0x34a3x18[_0xf734[61]];_0x34a3x15[_0xf734[62]]= _0x34a3x18[_0xf734[62]];_0x34a3x15[_0xf734[63]]= _0x34a3x18[_0xf734[63]];_0x34a3x15[_0xf734[64]]= _0x34a3x18[_0xf734[64]]}};var _0x34a3x19=desk[_0xf734[65]](_0x34a3x15);_0x34a3x19[_0xf734[67]](_0xf734[72],function(_0x34a3x10,_0x34a3x1a,_0x34a3x1b){if(_0x34a3x10){return handleError(_0x34a3x7,_0x34a3x10)};return _0x34a3x7[_0xf734[32]](200)[_0xf734[75]](_0x34a3x1a[_0xf734[74]][_0xf734[73]])})})[_0xf734[33]](function(_0x34a3x10){return handleError(_0x34a3x7,_0x34a3x10)})};exports[_0xf734[76]]= function(_0x34a3x6,_0x34a3x7){DeskAccount[_0xf734[55]]({where:{id:_0x34a3x6[_0xf734[14]][_0xf734[47]]},individualHooks:true})[_0xf734[43]](function(){return _0x34a3x7[_0xf734[46]](204)})[_0xf734[33]](function(_0x34a3x10){return handleError(_0x34a3x7,_0x34a3x10)})};function stripTrailingSlash(_0x34a3x1e){if(_0x34a3x1e[_0xf734[77]](-1) === _0xf734[78]){return _0x34a3x1e[_0xf734[77]](0,_0x34a3x1e[_0xf734[79]]- 1)};return _0x34a3x1e}function handleError(_0x34a3x7,_0x34a3x10){logger[_0xf734[81]](_0x34a3x10[_0xf734[80]]);return _0x34a3x7[_0xf734[32]](500)[_0xf734[31]](_0x34a3x10)}
\ No newline at end of file
+var _0x65e6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x64\x65\x73\x6B\x2E\x6A\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x6E\x61\x6D\x65","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\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","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x63\x68\x65\x63\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x61\x75\x74\x68\x54\x79\x70\x65","\x62\x61\x73\x69\x63","\x70\x61\x73\x73\x77\x6F\x72\x64","\x6F\x61\x75\x74\x68","\x63\x6F\x6E\x73\x75\x6D\x65\x72\x4B\x65\x79","\x63\x6F\x6E\x73\x75\x6D\x65\x72\x53\x65\x63\x72\x65\x74","\x74\x6F\x6B\x65\x6E","\x74\x6F\x6B\x65\x6E\x53\x65\x63\x72\x65\x74","\x63\x72\x65\x61\x74\x65\x43\x6C\x69\x65\x6E\x74","\x2F\x61\x70\x69\x2F\x76\x32\x2F\x75\x73\x65\x72\x73\x2F\x6D\x65","\x67\x65\x74","\x64\x65\x73\x6B\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x66\x69\x65\x6C\x64","\x76\x61\x6C\x75\x65","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x2F\x61\x70\x69\x2F\x76\x32\x2F\x63\x75\x73\x74\x6F\x6D\x5F\x66\x69\x65\x6C\x64\x73","\x65\x6E\x74\x72\x69\x65\x73","\x5F\x65\x6D\x62\x65\x64\x64\x65\x64","\x6A\x73\x6F\x6E","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x73\x75\x62\x73\x74\x72","\x2F","\x6C\x65\x6E\x67\x74\x68","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72"];_0x65e6[0];var _=require(_0x65e6[1]);var util=require(_0x65e6[2]);var desk=require(_0x65e6[3]);var logger=require(_0x65e6[5])(_0x65e6[4]);var DeskAccount=require(_0x65e6[7])[_0x65e6[6]];exports[_0x65e6[8]]= function(_0x757fx6,_0x757fx7){var _0x757fx8=[_0x65e6[9],_0x65e6[10],_0x65e6[11],_0x65e6[12]];var _0x757fx9=_0x757fx6[_0x65e6[14]][_0x65e6[13]]?parseInt(_0x757fx6[_0x65e6[14]][_0x65e6[13]],10):100;var _0x757fxa=_0x757fx6[_0x65e6[14]][_0x65e6[15]]?parseInt(_0x757fx6[_0x65e6[14]][_0x65e6[15]],10):0;var _0x757fxb={where:{},limit:_0x757fx9,offset:_0x757fxa* _0x757fx9};_[_0x65e6[29]](_0x757fx6[_0x65e6[14]],function(_0x757fxc,_0x757fxd){switch(_0x757fxd){case _0x65e6[13]:;case _0x65e6[15]:break;case _0x65e6[18]:_0x757fxb[_0x65e6[16]]= util[_0x65e6[21]](_0x65e6[17],_0x757fx6[_0x65e6[14]][_0x65e6[18]],_0x757fx6[_0x65e6[14]][_0x65e6[19]]|| _0x65e6[20])|| null;break;case _0x65e6[19]:break;case _0x65e6[27]:_0x757fxb[_0x65e6[23]][_0x65e6[22]]= [];_0x757fx8[_0x65e6[26]](function(_0x757fxe){var _0x757fxf={};_0x757fxf[_0x757fxe]= {$like:_0x65e6[24]+ _0x757fxc+ _0x65e6[24]};_0x757fxb[_0x65e6[23]][_0x65e6[22]][_0x65e6[25]](_0x757fxf)});break;default:_0x757fxb[_0x65e6[23]][_0x757fxd]= {$like:{}};_0x757fxb[_0x65e6[23]][_0x757fxd][_0x65e6[28]]= _0x65e6[24]+ _0x757fxc+ _0x65e6[24]}});return DeskAccount[_0x65e6[44]](_0x757fxb)[_0x65e6[43]](function(_0x757fx11){var _0x757fx12=Math[_0x65e6[35]](_0x757fx11[_0x65e6[34]]/ _0x757fx9);var _0x757fx13=_0x757fx12> (_0x757fxb[_0x65e6[36]]+ 1)?util[_0x65e6[21]](_0x65e6[37],_0x757fx6[_0x65e6[38]],_0x757fx6[_0x65e6[40]][_0x65e6[39]],_0x757fx6[_0x65e6[41]],_0x757fxa+ 1):null;var _0x757fx14=_0x757fxa> 0?util[_0x65e6[21]](_0x65e6[37],_0x757fx6[_0x65e6[38]],_0x757fx6[_0x65e6[40]][_0x65e6[39]],_0x757fx6[_0x65e6[41]],_0x757fxa- 1):null;return _0x757fx7[_0x65e6[32]](200)[_0x65e6[31]]({count:_0x757fx11[_0x65e6[34]],rows:_0x757fx11[_0x65e6[42]],next_page:_0x757fx13,previous_page:_0x757fx14,total_pages:_0x757fx12})})[_0x65e6[33]](function(_0x757fx10){return _0x757fx7[_0x65e6[32]](500)[_0x65e6[31]]({error:_0x65e6[30]})})};exports[_0x65e6[45]]= function(_0x757fx6,_0x757fx7){DeskAccount[_0x65e6[49]](_0x757fx6[_0x65e6[48]][_0x65e6[47]])[_0x65e6[43]](function(_0x757fx15){if(!_0x757fx15){return _0x757fx7[_0x65e6[46]](404)};return _0x757fx7[_0x65e6[31]](_0x757fx15)})[_0x65e6[33]](function(_0x757fx10){return handleError(_0x757fx7,_0x757fx10)})};exports[_0x65e6[50]]= function(_0x757fx6,_0x757fx7,_0x757fx16){DeskAccount[_0x65e6[50]](_0x757fx6[_0x65e6[51]])[_0x65e6[43]](function(_0x757fx15){return _0x757fx7[_0x65e6[32]](201)[_0x65e6[31]](_0x757fx15)})[_0x65e6[33]](function(_0x757fx10){return handleError(_0x757fx7,_0x757fx10)})};exports[_0x65e6[52]]= function(_0x757fx6,_0x757fx7){if(_0x757fx6[_0x65e6[51]][_0x65e6[47]]){delete _0x757fx6[_0x65e6[51]][_0x65e6[47]]};DeskAccount[_0x65e6[49]](_0x757fx6[_0x65e6[48]][_0x65e6[47]])[_0x65e6[43]](function(_0x757fx15){if(!_0x757fx15){return _0x757fx7[_0x65e6[46]](404)};var _0x757fx17=_[_0x65e6[53]](_0x757fx15,_0x757fx6[_0x65e6[51]]);_0x757fx17[_0x65e6[54]]()[_0x65e6[43]](function(){return _0x757fx7[_0x65e6[32]](200)[_0x65e6[31]](_0x757fx15)})[_0x65e6[33]](function(_0x757fx10){return handleError(_0x757fx7,_0x757fx10)})})[_0x65e6[33]](function(_0x757fx10){return handleError(_0x757fx7,_0x757fx10)})};exports[_0x65e6[55]]= function(_0x757fx6,_0x757fx7){DeskAccount[_0x65e6[49]](_0x757fx6[_0x65e6[48]][_0x65e6[47]])[_0x65e6[43]](function(_0x757fx15){if(!_0x757fx15){return _0x757fx7[_0x65e6[46]](404)};_0x757fx15[_0x65e6[55]]()[_0x65e6[43]](function(){return _0x757fx7[_0x65e6[46]](204)})[_0x65e6[33]](function(_0x757fx10){return handleError(_0x757fx7,_0x757fx10)})})[_0x65e6[33]](function(_0x757fx10){return handleError(_0x757fx7,_0x757fx10)})};exports[_0x65e6[56]]= function(_0x757fx6,_0x757fx7){DeskAccount[_0x65e6[49]](_0x757fx6[_0x65e6[48]][_0x65e6[47]])[_0x65e6[43]](function(_0x757fx18){var _0x757fx15={endpoint:stripTrailingSlash(_0x757fx18[_0x65e6[12]]),retry:false};if(_0x757fx18[_0x65e6[57]]=== _0x65e6[58]){_0x757fx15[_0x65e6[11]]= _0x757fx18[_0x65e6[11]];_0x757fx15[_0x65e6[59]]= _0x757fx18[_0x65e6[59]]}else {if(_0x757fx18[_0x65e6[57]]=== _0x65e6[60]){_0x757fx15[_0x65e6[61]]= _0x757fx18[_0x65e6[61]];_0x757fx15[_0x65e6[62]]= _0x757fx18[_0x65e6[62]];_0x757fx15[_0x65e6[63]]= _0x757fx18[_0x65e6[63]];_0x757fx15[_0x65e6[64]]= _0x757fx18[_0x65e6[64]]}};var _0x757fx19=desk[_0x65e6[65]](_0x757fx15);_0x757fx19[_0x65e6[67]](_0x65e6[66],function(_0x757fx10,_0x757fx1a,_0x757fx1b){if(_0x757fx10){return handleError(_0x757fx7,_0x757fx10)};return _0x757fx7[_0x65e6[46]](200)})})[_0x65e6[33]](function(_0x757fx10){return handleError(_0x757fx7,_0x757fx10)})};exports[_0x65e6[68]]= function(_0x757fx6,_0x757fx7){var _0x757fx1c={};_0x757fx1c[_0x757fx6[_0x65e6[48]][_0x65e6[69]]]= _0x757fx6[_0x65e6[51]][_0x65e6[70]];DeskAccount[_0x65e6[44]]({where:_0x757fx1c})[_0x65e6[43]](function(_0x757fx11){if(_0x757fx11[_0x65e6[34]]){return _0x757fx7[_0x65e6[32]](200)[_0x65e6[31]]({isValid:false,value:_0x757fx6[_0x65e6[51]][_0x65e6[70]]})};return _0x757fx7[_0x65e6[32]](200)[_0x65e6[31]]({isValid:true,value:_0x757fx6[_0x65e6[51]][_0x65e6[70]]})})[_0x65e6[33]](function(_0x757fx10){return handleError(_0x757fx7,_0x757fx10)})};exports[_0x65e6[71]]= function(_0x757fx6,_0x757fx7){DeskAccount[_0x65e6[49]](_0x757fx6[_0x65e6[48]][_0x65e6[47]])[_0x65e6[43]](function(_0x757fx18){var _0x757fx15={endpoint:stripTrailingSlash(_0x757fx18[_0x65e6[12]]),retry:false};if(_0x757fx18[_0x65e6[57]]=== _0x65e6[58]){_0x757fx15[_0x65e6[11]]= _0x757fx18[_0x65e6[11]];_0x757fx15[_0x65e6[59]]= _0x757fx18[_0x65e6[59]]}else {if(_0x757fx18[_0x65e6[57]]=== _0x65e6[60]){_0x757fx15[_0x65e6[61]]= _0x757fx18[_0x65e6[61]];_0x757fx15[_0x65e6[62]]= _0x757fx18[_0x65e6[62]];_0x757fx15[_0x65e6[63]]= _0x757fx18[_0x65e6[63]];_0x757fx15[_0x65e6[64]]= _0x757fx18[_0x65e6[64]]}};var _0x757fx19=desk[_0x65e6[65]](_0x757fx15);_0x757fx19[_0x65e6[67]](_0x65e6[72],function(_0x757fx10,_0x757fx1a,_0x757fx1b){if(_0x757fx10){return handleError(_0x757fx7,_0x757fx10)};return _0x757fx7[_0x65e6[32]](200)[_0x65e6[75]](_0x757fx1a[_0x65e6[74]][_0x65e6[73]])})})[_0x65e6[33]](function(_0x757fx10){return handleError(_0x757fx7,_0x757fx10)})};exports[_0x65e6[76]]= function(_0x757fx6,_0x757fx7){DeskAccount[_0x65e6[55]]({where:{id:_0x757fx6[_0x65e6[14]][_0x65e6[47]]},individualHooks:true})[_0x65e6[43]](function(){return _0x757fx7[_0x65e6[46]](204)})[_0x65e6[33]](function(_0x757fx10){return handleError(_0x757fx7,_0x757fx10)})};function stripTrailingSlash(_0x757fx1e){if(_0x757fx1e[_0x65e6[77]](-1) === _0x65e6[78]){return _0x757fx1e[_0x65e6[77]](0,_0x757fx1e[_0x65e6[79]]- 1)};return _0x757fx1e}function handleError(_0x757fx7,_0x757fx10){logger[_0x65e6[81]](_0x757fx10[_0x65e6[80]]);return _0x757fx7[_0x65e6[32]](500)[_0x65e6[31]](_0x757fx10)}
\ No newline at end of file