Built motion from commit 1020cd7.|0.0.107
[motion.git] / server / api / integration / integration.controller.js
index 6f63c2a..8641fa6 100644 (file)
@@ -1 +1 @@
-var _0xc091=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x70\x6C\x6F\x61\x64\x2D\x66\x69\x6C\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x70\x61\x74\x68","\x73\x69\x6D\x70\x6C\x65\x2D\x72\x61\x6E\x64\x6F\x6D","\x61\x64\x6D\x2D\x7A\x69\x70","\x73\x74\x72\x69\x6E\x67\x2D\x74\x6F\x2D\x6A\x73\x6F\x6E","\x66\x73","\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x66\x69\x6E\x64\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","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73","\x6A\x6F\x69\x6E","\x4D\x61\x78\x20\x6E\x75\x6D\x62\x65\x72\x20\x6F\x66\x20\x66\x69\x6C\x65\x73\x20\x75\x70\x6C\x6F\x61\x64\x20\x65\x78\x63\x65\x65\x64\x65\x64","\x4F\x6E\x6C\x79\x20\x7A\x69\x70\x20\x66\x6F\x72\x6D\x61\x74\x20\x61\x63\x63\x65\x70\x74\x65\x64","\x54\x68\x65\x20\x6D\x61\x78\x69\x6D\x75\x6D\x20\x66\x69\x6C\x65\x20\x73\x69\x7A\x65\x20\x69\x73\x20\x35\x20\x4D\x62","\x49\x6E\x76\x61\x6C\x69\x64\x20\x72\x65\x71\x75\x65\x73\x74","\x65\x6E\x64","\x66\x69\x6C\x65","\x67\x65\x74\x45\x6E\x74\x72\x69\x65\x73","\x6E\x61\x6D\x65","\x6D\x61\x6E\x69\x66\x65\x73\x74\x2E\x6A\x73\x6F\x6E","\x75\x74\x66\x38","\x67\x65\x74\x44\x61\x74\x61","\x75\x70\x6C\x6F\x61\x64\x5A\x69\x70","\x6C\x6F\x67","\x70\x61\x72\x73\x65","\x65\x78\x74\x72\x61\x63\x74\x41\x6C\x6C\x54\x6F","\x6D\x65\x72\x67\x65","\x6A\x73\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x75\x6E\x6C\x69\x6E\x6B\x53\x79\x6E\x63","\x6D\x61\x6E\x69\x66\x65\x73\x74","\x6D\x61\x6E\x69\x66\x65\x73\x74\x2E\x6A\x73\x6F\x6E\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x6F\x6E","\x65\x72\x72\x6F\x72","\x75\x70\x6C\x6F\x61\x64","\x75\x70\x64\x61\x74\x65","\x62\x6F\x64\x79","\x73\x61\x76\x65","\x66\x69\x6E\x64","\x64\x65\x73\x74\x72\x6F\x79"];_0xc091[0];var _=require(_0xc091[1]);var uploadFile=require(_0xc091[2]);var config=require(_0xc091[3]);var path=require(_0xc091[4]);var sr=require(_0xc091[5]);var admZip=require(_0xc091[6]);var str2json=require(_0xc091[7]);var fs=require(_0xc091[8]);var Integration=require(_0xc091[10])[_0xc091[9]];exports[_0xc091[11]]=function(_0xcd2axa,_0xcd2axb){Integration[_0xc091[17]]({where:_0xcd2axa[_0xc091[16]]})[_0xc091[15]](function(_0xcd2axd){return _0xcd2axb[_0xc091[14]](200)[_0xc091[13]](_0xcd2axd)})[_0xc091[12]](function(_0xcd2axc){return handleError(_0xcd2axb,_0xcd2axc)})};exports[_0xc091[18]]=function(_0xcd2axa,_0xcd2axb){Integration[_0xc091[22]](_0xcd2axa[_0xc091[21]][_0xc091[20]])[_0xc091[15]](function(_0xcd2axe){if(!_0xcd2axe){return _0xcd2axb[_0xc091[19]](404)};return _0xcd2axb[_0xc091[13]](_0xcd2axe);})[_0xc091[12]](function(_0xcd2axc){return handleError(_0xcd2axb,_0xcd2axc)})};exports[_0xc091[23]]=function(_0xcd2axa,_0xcd2axb){var _0xcd2axf= new uploadFile({dest:path[_0xc091[26]](config[_0xc091[24]],_0xc091[25]),maxFileSize:5*1000000,maxNumberOfFiles:1,minNumberOfFiles:1,acceptFileTypes:/(\.|\/)(zip)$/i,messages:{maxNumberOfFiles:_0xc091[27],acceptFileTypes:_0xc091[28],maxFileSize:_0xc091[29],invalidRequest:_0xc091[30]}});_0xcd2axf[_0xc091[48]](_0xc091[31],function(_0xcd2ax10,_0xcd2ax11){var _0xcd2ax12= new admZip(_0xcd2ax11[_0xc091[32]][_0xc091[4]]);var _0xcd2ax13=false;var _0xcd2ax14=_0xcd2ax12[_0xc091[33]]();_0xcd2ax14[_0xc091[44]](function(_0xcd2ax15){if(_0xcd2ax15[_0xc091[34]]===_0xc091[35]){var _0xcd2ax16=_0xcd2ax15[_0xc091[37]]().toString(_0xc091[36]);console[_0xc091[39]](_0xc091[38],_0xcd2ax16);try{_0xcd2ax13=JSON[_0xc091[40]](_0xcd2ax16);console[_0xc091[39]](_0xc091[38],_0xcd2ax13);Integration[_0xc091[23]](_[_0xc091[42]](_0xcd2ax11[_0xc091[32]],_0xcd2ax13))[_0xc091[15]](function(_0xcd2axe){_0xcd2ax12[_0xc091[41]](path[_0xc091[26]](config[_0xc091[24]],_0xc091[25]),true);return _0xcd2axb[_0xc091[14]](201)[_0xc091[13]](_0xcd2axe);})[_0xc091[12]](function(_0xcd2axc){return handleError(_0xcd2axb,_0xcd2axc)});}catch(e){console[_0xc091[39]](e);var _0xcd2axc={errors:[{type:_0xc091[43],message:e}]};return handleError(_0xcd2axb,_0xcd2axc);};}});fs[_0xc091[45]](_0xcd2ax11[_0xc091[32]][_0xc091[4]]);if(!_0xcd2ax13){var _0xcd2axc={errors:[{type:_0xc091[46],message:_0xc091[47]}]};return handleError(_0xcd2axb,_0xcd2axc);};});_0xcd2axf[_0xc091[48]](_0xc091[49],function(_0xcd2ax17){var _0xcd2axc={errors:[{type:_0xc091[50],message:_0xcd2ax17}]};return handleError(_0xcd2axb,_0xcd2axc);});_0xcd2axf[_0xc091[40]](_0xcd2axa);};exports[_0xc091[51]]=function(_0xcd2axa,_0xcd2axb){if(_0xcd2axa[_0xc091[52]][_0xc091[20]]){delete _0xcd2axa[_0xc091[52]][_0xc091[20]]};Integration[_0xc091[54]]({where:{id:_0xcd2axa[_0xc091[21]][_0xc091[20]]}})[_0xc091[15]](function(_0xcd2axe){if(!_0xcd2axe){return _0xcd2axb[_0xc091[19]](404)};var _0xcd2ax18=_[_0xc091[42]](_0xcd2axe,_0xcd2axa[_0xc091[52]]);_0xcd2ax18[_0xc091[53]]()[_0xc091[15]](function(){return _0xcd2axb[_0xc091[14]](200)[_0xc091[13]](_0xcd2axe)})[_0xc091[12]](function(_0xcd2axc){return handleError(_0xcd2axb,_0xcd2axc)});})[_0xc091[12]](function(_0xcd2axc){return handleError(_0xcd2axb,_0xcd2axc)});};exports[_0xc091[55]]=function(_0xcd2axa,_0xcd2axb){Integration[_0xc091[54]]({where:{id:_0xcd2axa[_0xc091[21]][_0xc091[20]]}})[_0xc091[15]](function(_0xcd2axe){if(!_0xcd2axe){return _0xcd2axb[_0xc091[19]](404)};_0xcd2axe[_0xc091[55]]()[_0xc091[15]](function(){return _0xcd2axb[_0xc091[19]](204)})[_0xc091[12]](function(_0xcd2axc){return handleError(_0xcd2axb,_0xcd2axc)});})[_0xc091[12]](function(_0xcd2axc){return handleError(_0xcd2axb,_0xcd2axc)})};function handleError(_0xcd2axb,_0xcd2axc){return _0xcd2axb[_0xc091[14]](500)[_0xc091[13]](_0xcd2axc)}
\ No newline at end of file
+var _0xc99e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x70\x6C\x6F\x61\x64\x2D\x66\x69\x6C\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x70\x61\x74\x68","\x73\x69\x6D\x70\x6C\x65\x2D\x72\x61\x6E\x64\x6F\x6D","\x61\x64\x6D\x2D\x7A\x69\x70","\x73\x74\x72\x69\x6E\x67\x2D\x74\x6F\x2D\x6A\x73\x6F\x6E","\x66\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\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","\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","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73","\x6A\x6F\x69\x6E","\x4D\x61\x78\x20\x6E\x75\x6D\x62\x65\x72\x20\x6F\x66\x20\x66\x69\x6C\x65\x73\x20\x75\x70\x6C\x6F\x61\x64\x20\x65\x78\x63\x65\x65\x64\x65\x64","\x4F\x6E\x6C\x79\x20\x7A\x69\x70\x20\x66\x6F\x72\x6D\x61\x74\x20\x61\x63\x63\x65\x70\x74\x65\x64","\x54\x68\x65\x20\x6D\x61\x78\x69\x6D\x75\x6D\x20\x66\x69\x6C\x65\x20\x73\x69\x7A\x65\x20\x69\x73\x20\x35\x20\x4D\x62","\x49\x6E\x76\x61\x6C\x69\x64\x20\x72\x65\x71\x75\x65\x73\x74","\x65\x6E\x64","\x66\x69\x6C\x65","\x67\x65\x74\x45\x6E\x74\x72\x69\x65\x73","\x6E\x61\x6D\x65","\x6D\x61\x6E\x69\x66\x65\x73\x74\x2E\x6A\x73\x6F\x6E","\x75\x74\x66\x38","\x67\x65\x74\x44\x61\x74\x61","\x75\x70\x6C\x6F\x61\x64\x5A\x69\x70","\x6C\x6F\x67","\x70\x61\x72\x73\x65","\x65\x78\x74\x72\x61\x63\x74\x41\x6C\x6C\x54\x6F","\x6D\x65\x72\x67\x65","\x6A\x73\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x75\x6E\x6C\x69\x6E\x6B\x53\x79\x6E\x63","\x6D\x61\x6E\x69\x66\x65\x73\x74","\x6D\x61\x6E\x69\x66\x65\x73\x74\x2E\x6A\x73\x6F\x6E\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x6F\x6E","\x65\x72\x72\x6F\x72","\x75\x70\x6C\x6F\x61\x64","\x75\x70\x64\x61\x74\x65","\x62\x6F\x64\x79","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x66\x69\x6E\x64"];_0xc99e[0];var _=require(_0xc99e[1]);var uploadFile=require(_0xc99e[2]);var config=require(_0xc99e[3]);var path=require(_0xc99e[4]);var sr=require(_0xc99e[5]);var admZip=require(_0xc99e[6]);var str2json=require(_0xc99e[7]);var fs=require(_0xc99e[8]);var Util=require(_0xc99e[9]);var Integration=require(_0xc99e[11])[_0xc99e[10]];exports[_0xc99e[12]]=function(_0x753axb,_0x753axc,_0x753axd){return Integration[_0xc99e[19]](Util[_0xc99e[18]](_0x753axb[_0xc99e[17]]))[_0xc99e[16]](function(_0x753axf){_0x753axc[_0xc99e[15]](200)[_0xc99e[14]](_0x753axf)})[_0xc99e[13]](function(_0x753axe){return handleError(_0x753axc,_0x753axe)})};exports[_0xc99e[20]]=function(_0x753axb,_0x753axc){return Integration[_0xc99e[24]](_0x753axb[_0xc99e[23]][_0xc99e[22]])[_0xc99e[16]](function(_0x753ax10){if(!_0x753ax10){return _0x753axc[_0xc99e[21]](404)};return _0x753axc[_0xc99e[14]](_0x753ax10)})[_0xc99e[13]](function(_0x753axe){return handleError(_0x753axc,_0x753axe)})};exports[_0xc99e[25]]=function(_0x753axb,_0x753axc){var _0x753ax11= new uploadFile({dest:path[_0xc99e[28]](config[_0xc99e[26]],_0xc99e[27]),maxFileSize:5*1000000,maxNumberOfFiles:1,minNumberOfFiles:1,acceptFileTypes:/(\.|\/)(zip)$/i,messages:{maxNumberOfFiles:_0xc99e[29],acceptFileTypes:_0xc99e[30],maxFileSize:_0xc99e[31],invalidRequest:_0xc99e[32]}});_0x753ax11[_0xc99e[50]](_0xc99e[33],function(_0x753ax12,_0x753ax13){var _0x753ax14= new admZip(_0x753ax13[_0xc99e[34]][_0xc99e[4]]);var _0x753ax15=false;var _0x753ax16=_0x753ax14[_0xc99e[35]]();_0x753ax16[_0xc99e[46]](function(_0x753ax17){if(_0x753ax17[_0xc99e[36]]===_0xc99e[37]){var _0x753ax18=_0x753ax17[_0xc99e[39]]().toString(_0xc99e[38]);console[_0xc99e[41]](_0xc99e[40],_0x753ax18);try{_0x753ax15=JSON[_0xc99e[42]](_0x753ax18);console[_0xc99e[41]](_0xc99e[40],_0x753ax15);Integration[_0xc99e[25]](_[_0xc99e[44]](_0x753ax13[_0xc99e[34]],_0x753ax15))[_0xc99e[16]](function(_0x753ax10){_0x753ax14[_0xc99e[43]](path[_0xc99e[28]](config[_0xc99e[26]],_0xc99e[27]),true);return _0x753axc[_0xc99e[15]](201)[_0xc99e[14]](_0x753ax10)})[_0xc99e[13]](function(_0x753axe){return handleError(_0x753axc,_0x753axe)})}catch(e){console[_0xc99e[41]](e);var _0x753axe={errors:[{type:_0xc99e[45],message:e}]};return handleError(_0x753axc,_0x753axe)}}});fs[_0xc99e[47]](_0x753ax13[_0xc99e[34]][_0xc99e[4]]);if(!_0x753ax15){var _0x753axe={errors:[{type:_0xc99e[48],message:_0xc99e[49]}]};return handleError(_0x753axc,_0x753axe)}});_0x753ax11[_0xc99e[50]](_0xc99e[51],function(_0x753ax19){var _0x753axe={errors:[{type:_0xc99e[52],message:_0x753ax19}]};return handleError(_0x753axc,_0x753axe)});_0x753ax11[_0xc99e[42]](_0x753axb)};exports[_0xc99e[53]]=function(_0x753axb,_0x753axc){if(_0x753axb[_0xc99e[54]][_0xc99e[22]]){delete _0x753axb[_0xc99e[54]][_0xc99e[22]]};return Integration[_0xc99e[24]](_0x753axb[_0xc99e[23]][_0xc99e[22]])[_0xc99e[16]](function(_0x753ax10){if(!_0x753ax10){return _0x753axc[_0xc99e[21]](404)};var _0x753ax1a=_[_0xc99e[44]](_0x753ax10,_0x753axb[_0xc99e[54]]);return _0x753ax1a[_0xc99e[55]]()})[_0xc99e[16]](function(_0x753ax10){return _0x753axc[_0xc99e[15]](200)[_0xc99e[14]](_0x753ax10)})[_0xc99e[13]](function(_0x753axe){return handleError(_0x753axc,_0x753axe)})};exports[_0xc99e[56]]=function(_0x753axb,_0x753axc){return Integration[_0xc99e[57]]({where:{id:_0x753axb[_0xc99e[23]][_0xc99e[22]]}})[_0xc99e[16]](function(_0x753ax10){if(!_0x753ax10){return _0x753axc[_0xc99e[21]](404)};return _0x753ax10[_0xc99e[56]]()})[_0xc99e[16]](function(){return _0x753axc[_0xc99e[21]](204)})[_0xc99e[13]](function(_0x753axe){return handleError(_0x753axc,_0x753axe)})};function handleError(_0x753axc,_0x753axe){return _0x753axc[_0xc99e[15]](500)[_0xc99e[14]](_0x753axe)}
\ No newline at end of file