Built motion from commit 7db2bc834.|1.0.35
[motion.git] / server / api / desk_account / desk_account.controller.js
index 08bb80f..7f7485b 100644 (file)
@@ -1 +1 @@
-var _0x71e9=["\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"];_0x71e9[0];var _=require(_0x71e9[1]);var util=require(_0x71e9[2]);var desk=require(_0x71e9[3]);var logger=require(_0x71e9[5])(_0x71e9[4]);var DeskAccount=require(_0x71e9[7])[_0x71e9[6]];exports[_0x71e9[8]]= function(_0x2abex6,_0x2abex7){var _0x2abex8=[_0x71e9[9],_0x71e9[10],_0x71e9[11],_0x71e9[12]];var _0x2abex9=_0x2abex6[_0x71e9[14]][_0x71e9[13]]?parseInt(_0x2abex6[_0x71e9[14]][_0x71e9[13]],10):100;var _0x2abexa=_0x2abex6[_0x71e9[14]][_0x71e9[15]]?parseInt(_0x2abex6[_0x71e9[14]][_0x71e9[15]],10):0;var _0x2abexb={where:{},limit:_0x2abex9,offset:_0x2abexa* _0x2abex9};_[_0x71e9[29]](_0x2abex6[_0x71e9[14]],function(_0x2abexc,_0x2abexd){switch(_0x2abexd){case _0x71e9[13]:;case _0x71e9[15]:break;case _0x71e9[18]:_0x2abexb[_0x71e9[16]]= util[_0x71e9[21]](_0x71e9[17],_0x2abex6[_0x71e9[14]][_0x71e9[18]],_0x2abex6[_0x71e9[14]][_0x71e9[19]]|| _0x71e9[20])|| null;break;case _0x71e9[19]:break;case _0x71e9[27]:_0x2abexb[_0x71e9[23]][_0x71e9[22]]= [];_0x2abex8[_0x71e9[26]](function(_0x2abexe){var _0x2abexf={};_0x2abexf[_0x2abexe]= {$like:_0x71e9[24]+ _0x2abexc+ _0x71e9[24]};_0x2abexb[_0x71e9[23]][_0x71e9[22]][_0x71e9[25]](_0x2abexf)});break;default:_0x2abexb[_0x71e9[23]][_0x2abexd]= {$like:{}};_0x2abexb[_0x71e9[23]][_0x2abexd][_0x71e9[28]]= _0x71e9[24]+ _0x2abexc+ _0x71e9[24]}});return DeskAccount[_0x71e9[44]](_0x2abexb)[_0x71e9[43]](function(_0x2abex11){var _0x2abex12=Math[_0x71e9[35]](_0x2abex11[_0x71e9[34]]/ _0x2abex9);var _0x2abex13=_0x2abex12> (_0x2abexb[_0x71e9[36]]+ 1)?util[_0x71e9[21]](_0x71e9[37],_0x2abex6[_0x71e9[38]],_0x2abex6[_0x71e9[40]][_0x71e9[39]],_0x2abex6[_0x71e9[41]],_0x2abexa+ 1):null;var _0x2abex14=_0x2abexa> 0?util[_0x71e9[21]](_0x71e9[37],_0x2abex6[_0x71e9[38]],_0x2abex6[_0x71e9[40]][_0x71e9[39]],_0x2abex6[_0x71e9[41]],_0x2abexa- 1):null;return _0x2abex7[_0x71e9[32]](200)[_0x71e9[31]]({count:_0x2abex11[_0x71e9[34]],rows:_0x2abex11[_0x71e9[42]],next_page:_0x2abex13,previous_page:_0x2abex14,total_pages:_0x2abex12})})[_0x71e9[33]](function(_0x2abex10){return _0x2abex7[_0x71e9[32]](500)[_0x71e9[31]]({error:_0x71e9[30]})})};exports[_0x71e9[45]]= function(_0x2abex6,_0x2abex7){DeskAccount[_0x71e9[49]](_0x2abex6[_0x71e9[48]][_0x71e9[47]])[_0x71e9[43]](function(_0x2abex15){if(!_0x2abex15){return _0x2abex7[_0x71e9[46]](404)};return _0x2abex7[_0x71e9[31]](_0x2abex15)})[_0x71e9[33]](function(_0x2abex10){return handleError(_0x2abex7,_0x2abex10)})};exports[_0x71e9[50]]= function(_0x2abex6,_0x2abex7,_0x2abex16){DeskAccount[_0x71e9[50]](_0x2abex6[_0x71e9[51]])[_0x71e9[43]](function(_0x2abex15){return _0x2abex7[_0x71e9[32]](201)[_0x71e9[31]](_0x2abex15)})[_0x71e9[33]](function(_0x2abex10){return handleError(_0x2abex7,_0x2abex10)})};exports[_0x71e9[52]]= function(_0x2abex6,_0x2abex7){if(_0x2abex6[_0x71e9[51]][_0x71e9[47]]){delete _0x2abex6[_0x71e9[51]][_0x71e9[47]]};DeskAccount[_0x71e9[49]](_0x2abex6[_0x71e9[48]][_0x71e9[47]])[_0x71e9[43]](function(_0x2abex15){if(!_0x2abex15){return _0x2abex7[_0x71e9[46]](404)};var _0x2abex17=_[_0x71e9[53]](_0x2abex15,_0x2abex6[_0x71e9[51]]);_0x2abex17[_0x71e9[54]]()[_0x71e9[43]](function(){return _0x2abex7[_0x71e9[32]](200)[_0x71e9[31]](_0x2abex15)})[_0x71e9[33]](function(_0x2abex10){return handleError(_0x2abex7,_0x2abex10)})})[_0x71e9[33]](function(_0x2abex10){return handleError(_0x2abex7,_0x2abex10)})};exports[_0x71e9[55]]= function(_0x2abex6,_0x2abex7){DeskAccount[_0x71e9[49]](_0x2abex6[_0x71e9[48]][_0x71e9[47]])[_0x71e9[43]](function(_0x2abex15){if(!_0x2abex15){return _0x2abex7[_0x71e9[46]](404)};_0x2abex15[_0x71e9[55]]()[_0x71e9[43]](function(){return _0x2abex7[_0x71e9[46]](204)})[_0x71e9[33]](function(_0x2abex10){return handleError(_0x2abex7,_0x2abex10)})})[_0x71e9[33]](function(_0x2abex10){return handleError(_0x2abex7,_0x2abex10)})};exports[_0x71e9[56]]= function(_0x2abex6,_0x2abex7){DeskAccount[_0x71e9[49]](_0x2abex6[_0x71e9[48]][_0x71e9[47]])[_0x71e9[43]](function(_0x2abex18){var _0x2abex15={endpoint:stripTrailingSlash(_0x2abex18[_0x71e9[12]]),retry:false};if(_0x2abex18[_0x71e9[57]]=== _0x71e9[58]){_0x2abex15[_0x71e9[11]]= _0x2abex18[_0x71e9[11]];_0x2abex15[_0x71e9[59]]= _0x2abex18[_0x71e9[59]]}else {if(_0x2abex18[_0x71e9[57]]=== _0x71e9[60]){_0x2abex15[_0x71e9[61]]= _0x2abex18[_0x71e9[61]];_0x2abex15[_0x71e9[62]]= _0x2abex18[_0x71e9[62]];_0x2abex15[_0x71e9[63]]= _0x2abex18[_0x71e9[63]];_0x2abex15[_0x71e9[64]]= _0x2abex18[_0x71e9[64]]}};var _0x2abex19=desk[_0x71e9[65]](_0x2abex15);_0x2abex19[_0x71e9[67]](_0x71e9[66],function(_0x2abex10,_0x2abex1a,_0x2abex1b){if(_0x2abex10){return handleError(_0x2abex7,_0x2abex10)};return _0x2abex7[_0x71e9[46]](200)})})[_0x71e9[33]](function(_0x2abex10){return handleError(_0x2abex7,_0x2abex10)})};exports[_0x71e9[68]]= function(_0x2abex6,_0x2abex7){var _0x2abex1c={};_0x2abex1c[_0x2abex6[_0x71e9[48]][_0x71e9[69]]]= _0x2abex6[_0x71e9[51]][_0x71e9[70]];DeskAccount[_0x71e9[44]]({where:_0x2abex1c})[_0x71e9[43]](function(_0x2abex11){if(_0x2abex11[_0x71e9[34]]){return _0x2abex7[_0x71e9[32]](200)[_0x71e9[31]]({isValid:false,value:_0x2abex6[_0x71e9[51]][_0x71e9[70]]})};return _0x2abex7[_0x71e9[32]](200)[_0x71e9[31]]({isValid:true,value:_0x2abex6[_0x71e9[51]][_0x71e9[70]]})})[_0x71e9[33]](function(_0x2abex10){return handleError(_0x2abex7,_0x2abex10)})};exports[_0x71e9[71]]= function(_0x2abex6,_0x2abex7){DeskAccount[_0x71e9[49]](_0x2abex6[_0x71e9[48]][_0x71e9[47]])[_0x71e9[43]](function(_0x2abex18){var _0x2abex15={endpoint:stripTrailingSlash(_0x2abex18[_0x71e9[12]]),retry:false};if(_0x2abex18[_0x71e9[57]]=== _0x71e9[58]){_0x2abex15[_0x71e9[11]]= _0x2abex18[_0x71e9[11]];_0x2abex15[_0x71e9[59]]= _0x2abex18[_0x71e9[59]]}else {if(_0x2abex18[_0x71e9[57]]=== _0x71e9[60]){_0x2abex15[_0x71e9[61]]= _0x2abex18[_0x71e9[61]];_0x2abex15[_0x71e9[62]]= _0x2abex18[_0x71e9[62]];_0x2abex15[_0x71e9[63]]= _0x2abex18[_0x71e9[63]];_0x2abex15[_0x71e9[64]]= _0x2abex18[_0x71e9[64]]}};var _0x2abex19=desk[_0x71e9[65]](_0x2abex15);_0x2abex19[_0x71e9[67]](_0x71e9[72],function(_0x2abex10,_0x2abex1a,_0x2abex1b){if(_0x2abex10){return handleError(_0x2abex7,_0x2abex10)};return _0x2abex7[_0x71e9[32]](200)[_0x71e9[75]](_0x2abex1a[_0x71e9[74]][_0x71e9[73]])})})[_0x71e9[33]](function(_0x2abex10){return handleError(_0x2abex7,_0x2abex10)})};exports[_0x71e9[76]]= function(_0x2abex6,_0x2abex7){DeskAccount[_0x71e9[55]]({where:{id:_0x2abex6[_0x71e9[14]][_0x71e9[47]]},individualHooks:true})[_0x71e9[43]](function(){return _0x2abex7[_0x71e9[46]](204)})[_0x71e9[33]](function(_0x2abex10){return handleError(_0x2abex7,_0x2abex10)})};function stripTrailingSlash(_0x2abex1e){if(_0x2abex1e[_0x71e9[77]](-1) === _0x71e9[78]){return _0x2abex1e[_0x71e9[77]](0,_0x2abex1e[_0x71e9[79]]- 1)};return _0x2abex1e}function handleError(_0x2abex7,_0x2abex10){logger[_0x71e9[81]](_0x2abex10[_0x71e9[80]]);return _0x2abex7[_0x71e9[32]](500)[_0x71e9[31]](_0x2abex10)}
\ No newline at end of file
+var _0xbaf2=["\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"];_0xbaf2[0];var _=require(_0xbaf2[1]);var util=require(_0xbaf2[2]);var desk=require(_0xbaf2[3]);var logger=require(_0xbaf2[5])(_0xbaf2[4]);var DeskAccount=require(_0xbaf2[7])[_0xbaf2[6]];exports[_0xbaf2[8]]= function(_0x76f2x6,_0x76f2x7){var _0x76f2x8=[_0xbaf2[9],_0xbaf2[10],_0xbaf2[11],_0xbaf2[12]];var _0x76f2x9=_0x76f2x6[_0xbaf2[14]][_0xbaf2[13]]?parseInt(_0x76f2x6[_0xbaf2[14]][_0xbaf2[13]],10):100;var _0x76f2xa=_0x76f2x6[_0xbaf2[14]][_0xbaf2[15]]?parseInt(_0x76f2x6[_0xbaf2[14]][_0xbaf2[15]],10):0;var _0x76f2xb={where:{},limit:_0x76f2x9,offset:_0x76f2xa* _0x76f2x9};_[_0xbaf2[29]](_0x76f2x6[_0xbaf2[14]],function(_0x76f2xc,_0x76f2xd){switch(_0x76f2xd){case _0xbaf2[13]:;case _0xbaf2[15]:break;case _0xbaf2[18]:_0x76f2xb[_0xbaf2[16]]= util[_0xbaf2[21]](_0xbaf2[17],_0x76f2x6[_0xbaf2[14]][_0xbaf2[18]],_0x76f2x6[_0xbaf2[14]][_0xbaf2[19]]|| _0xbaf2[20])|| null;break;case _0xbaf2[19]:break;case _0xbaf2[27]:_0x76f2xb[_0xbaf2[23]][_0xbaf2[22]]= [];_0x76f2x8[_0xbaf2[26]](function(_0x76f2xe){var _0x76f2xf={};_0x76f2xf[_0x76f2xe]= {$like:_0xbaf2[24]+ _0x76f2xc+ _0xbaf2[24]};_0x76f2xb[_0xbaf2[23]][_0xbaf2[22]][_0xbaf2[25]](_0x76f2xf)});break;default:_0x76f2xb[_0xbaf2[23]][_0x76f2xd]= {$like:{}};_0x76f2xb[_0xbaf2[23]][_0x76f2xd][_0xbaf2[28]]= _0xbaf2[24]+ _0x76f2xc+ _0xbaf2[24]}});return DeskAccount[_0xbaf2[44]](_0x76f2xb)[_0xbaf2[43]](function(_0x76f2x11){var _0x76f2x12=Math[_0xbaf2[35]](_0x76f2x11[_0xbaf2[34]]/ _0x76f2x9);var _0x76f2x13=_0x76f2x12> (_0x76f2xb[_0xbaf2[36]]+ 1)?util[_0xbaf2[21]](_0xbaf2[37],_0x76f2x6[_0xbaf2[38]],_0x76f2x6[_0xbaf2[40]][_0xbaf2[39]],_0x76f2x6[_0xbaf2[41]],_0x76f2xa+ 1):null;var _0x76f2x14=_0x76f2xa> 0?util[_0xbaf2[21]](_0xbaf2[37],_0x76f2x6[_0xbaf2[38]],_0x76f2x6[_0xbaf2[40]][_0xbaf2[39]],_0x76f2x6[_0xbaf2[41]],_0x76f2xa- 1):null;return _0x76f2x7[_0xbaf2[32]](200)[_0xbaf2[31]]({count:_0x76f2x11[_0xbaf2[34]],rows:_0x76f2x11[_0xbaf2[42]],next_page:_0x76f2x13,previous_page:_0x76f2x14,total_pages:_0x76f2x12})})[_0xbaf2[33]](function(_0x76f2x10){return _0x76f2x7[_0xbaf2[32]](500)[_0xbaf2[31]]({error:_0xbaf2[30]})})};exports[_0xbaf2[45]]= function(_0x76f2x6,_0x76f2x7){DeskAccount[_0xbaf2[49]](_0x76f2x6[_0xbaf2[48]][_0xbaf2[47]])[_0xbaf2[43]](function(_0x76f2x15){if(!_0x76f2x15){return _0x76f2x7[_0xbaf2[46]](404)};return _0x76f2x7[_0xbaf2[31]](_0x76f2x15)})[_0xbaf2[33]](function(_0x76f2x10){return handleError(_0x76f2x7,_0x76f2x10)})};exports[_0xbaf2[50]]= function(_0x76f2x6,_0x76f2x7,_0x76f2x16){DeskAccount[_0xbaf2[50]](_0x76f2x6[_0xbaf2[51]])[_0xbaf2[43]](function(_0x76f2x15){return _0x76f2x7[_0xbaf2[32]](201)[_0xbaf2[31]](_0x76f2x15)})[_0xbaf2[33]](function(_0x76f2x10){return handleError(_0x76f2x7,_0x76f2x10)})};exports[_0xbaf2[52]]= function(_0x76f2x6,_0x76f2x7){if(_0x76f2x6[_0xbaf2[51]][_0xbaf2[47]]){delete _0x76f2x6[_0xbaf2[51]][_0xbaf2[47]]};DeskAccount[_0xbaf2[49]](_0x76f2x6[_0xbaf2[48]][_0xbaf2[47]])[_0xbaf2[43]](function(_0x76f2x15){if(!_0x76f2x15){return _0x76f2x7[_0xbaf2[46]](404)};var _0x76f2x17=_[_0xbaf2[53]](_0x76f2x15,_0x76f2x6[_0xbaf2[51]]);_0x76f2x17[_0xbaf2[54]]()[_0xbaf2[43]](function(){return _0x76f2x7[_0xbaf2[32]](200)[_0xbaf2[31]](_0x76f2x15)})[_0xbaf2[33]](function(_0x76f2x10){return handleError(_0x76f2x7,_0x76f2x10)})})[_0xbaf2[33]](function(_0x76f2x10){return handleError(_0x76f2x7,_0x76f2x10)})};exports[_0xbaf2[55]]= function(_0x76f2x6,_0x76f2x7){DeskAccount[_0xbaf2[49]](_0x76f2x6[_0xbaf2[48]][_0xbaf2[47]])[_0xbaf2[43]](function(_0x76f2x15){if(!_0x76f2x15){return _0x76f2x7[_0xbaf2[46]](404)};_0x76f2x15[_0xbaf2[55]]()[_0xbaf2[43]](function(){return _0x76f2x7[_0xbaf2[46]](204)})[_0xbaf2[33]](function(_0x76f2x10){return handleError(_0x76f2x7,_0x76f2x10)})})[_0xbaf2[33]](function(_0x76f2x10){return handleError(_0x76f2x7,_0x76f2x10)})};exports[_0xbaf2[56]]= function(_0x76f2x6,_0x76f2x7){DeskAccount[_0xbaf2[49]](_0x76f2x6[_0xbaf2[48]][_0xbaf2[47]])[_0xbaf2[43]](function(_0x76f2x18){var _0x76f2x15={endpoint:stripTrailingSlash(_0x76f2x18[_0xbaf2[12]]),retry:false};if(_0x76f2x18[_0xbaf2[57]]=== _0xbaf2[58]){_0x76f2x15[_0xbaf2[11]]= _0x76f2x18[_0xbaf2[11]];_0x76f2x15[_0xbaf2[59]]= _0x76f2x18[_0xbaf2[59]]}else {if(_0x76f2x18[_0xbaf2[57]]=== _0xbaf2[60]){_0x76f2x15[_0xbaf2[61]]= _0x76f2x18[_0xbaf2[61]];_0x76f2x15[_0xbaf2[62]]= _0x76f2x18[_0xbaf2[62]];_0x76f2x15[_0xbaf2[63]]= _0x76f2x18[_0xbaf2[63]];_0x76f2x15[_0xbaf2[64]]= _0x76f2x18[_0xbaf2[64]]}};var _0x76f2x19=desk[_0xbaf2[65]](_0x76f2x15);_0x76f2x19[_0xbaf2[67]](_0xbaf2[66],function(_0x76f2x10,_0x76f2x1a,_0x76f2x1b){if(_0x76f2x10){return handleError(_0x76f2x7,_0x76f2x10)};return _0x76f2x7[_0xbaf2[46]](200)})})[_0xbaf2[33]](function(_0x76f2x10){return handleError(_0x76f2x7,_0x76f2x10)})};exports[_0xbaf2[68]]= function(_0x76f2x6,_0x76f2x7){var _0x76f2x1c={};_0x76f2x1c[_0x76f2x6[_0xbaf2[48]][_0xbaf2[69]]]= _0x76f2x6[_0xbaf2[51]][_0xbaf2[70]];DeskAccount[_0xbaf2[44]]({where:_0x76f2x1c})[_0xbaf2[43]](function(_0x76f2x11){if(_0x76f2x11[_0xbaf2[34]]){return _0x76f2x7[_0xbaf2[32]](200)[_0xbaf2[31]]({isValid:false,value:_0x76f2x6[_0xbaf2[51]][_0xbaf2[70]]})};return _0x76f2x7[_0xbaf2[32]](200)[_0xbaf2[31]]({isValid:true,value:_0x76f2x6[_0xbaf2[51]][_0xbaf2[70]]})})[_0xbaf2[33]](function(_0x76f2x10){return handleError(_0x76f2x7,_0x76f2x10)})};exports[_0xbaf2[71]]= function(_0x76f2x6,_0x76f2x7){DeskAccount[_0xbaf2[49]](_0x76f2x6[_0xbaf2[48]][_0xbaf2[47]])[_0xbaf2[43]](function(_0x76f2x18){var _0x76f2x15={endpoint:stripTrailingSlash(_0x76f2x18[_0xbaf2[12]]),retry:false};if(_0x76f2x18[_0xbaf2[57]]=== _0xbaf2[58]){_0x76f2x15[_0xbaf2[11]]= _0x76f2x18[_0xbaf2[11]];_0x76f2x15[_0xbaf2[59]]= _0x76f2x18[_0xbaf2[59]]}else {if(_0x76f2x18[_0xbaf2[57]]=== _0xbaf2[60]){_0x76f2x15[_0xbaf2[61]]= _0x76f2x18[_0xbaf2[61]];_0x76f2x15[_0xbaf2[62]]= _0x76f2x18[_0xbaf2[62]];_0x76f2x15[_0xbaf2[63]]= _0x76f2x18[_0xbaf2[63]];_0x76f2x15[_0xbaf2[64]]= _0x76f2x18[_0xbaf2[64]]}};var _0x76f2x19=desk[_0xbaf2[65]](_0x76f2x15);_0x76f2x19[_0xbaf2[67]](_0xbaf2[72],function(_0x76f2x10,_0x76f2x1a,_0x76f2x1b){if(_0x76f2x10){return handleError(_0x76f2x7,_0x76f2x10)};return _0x76f2x7[_0xbaf2[32]](200)[_0xbaf2[75]](_0x76f2x1a[_0xbaf2[74]][_0xbaf2[73]])})})[_0xbaf2[33]](function(_0x76f2x10){return handleError(_0x76f2x7,_0x76f2x10)})};exports[_0xbaf2[76]]= function(_0x76f2x6,_0x76f2x7){DeskAccount[_0xbaf2[55]]({where:{id:_0x76f2x6[_0xbaf2[14]][_0xbaf2[47]]},individualHooks:true})[_0xbaf2[43]](function(){return _0x76f2x7[_0xbaf2[46]](204)})[_0xbaf2[33]](function(_0x76f2x10){return handleError(_0x76f2x7,_0x76f2x10)})};function stripTrailingSlash(_0x76f2x1e){if(_0x76f2x1e[_0xbaf2[77]](-1) === _0xbaf2[78]){return _0x76f2x1e[_0xbaf2[77]](0,_0x76f2x1e[_0xbaf2[79]]- 1)};return _0x76f2x1e}function handleError(_0x76f2x7,_0x76f2x10){logger[_0xbaf2[81]](_0x76f2x10[_0xbaf2[80]]);return _0x76f2x7[_0xbaf2[32]](500)[_0xbaf2[31]](_0x76f2x10)}
\ No newline at end of file