Built motion from commit 6132600.|0.0.40
[motion.git] / server / api / update / update.controller.js
1 var _0x6b78=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x70\x61\x74\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x72\x6F\x6F\x74","\x6A\x6F\x69\x6E","\x73\x69\x6D\x70\x6C\x65\x2D\x67\x69\x74","\x55\x70\x64\x61\x74\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x76\x65\x72\x73\x69\x6F\x6E","\x7C","\x73\x70\x6C\x69\x74","\x6D\x65\x73\x73\x61\x67\x65","\x75\x6E\x6B\x6E\x6F\x77\x6E","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x61\x6C\x6C","\x4C\x61\x74\x65\x73\x74\x20\x61\x76\x61\x69\x6C\x61\x62\x6C\x65\x20\x74\x61\x67\x3A\x20\x25\x73","\x6C\x61\x74\x65\x73\x74","\x6C\x6F\x67","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x73\x68\x6F\x77","\x70\x75\x6C\x6C","\x63\x68\x65\x63\x6B\x6F\x75\x74","\x72\x65\x71\x2E\x70\x61\x72\x61\x6D\x73\x2E\x68\x61\x73\x68","\x68\x61\x73\x68","\x70\x61\x72\x61\x6D\x73","\x63\x72\x65\x61\x74\x65","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x69\x64","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x66\x69\x6E\x64","\x64\x65\x73\x74\x72\x6F\x79"];_0x6b78[0];var _=require(_0x6b78[1]);var path=require(_0x6b78[2]);var config=require(_0x6b78[3]);var Git=require(_0x6b78[6])(path[_0x6b78[5]](config[_0x6b78[4]]));var Update=require(_0x6b78[8])[_0x6b78[7]];exports[_0x6b78[9]]=function(_0x27f2x6,_0x27f2x7){Git[_0x6b78[20]](function(_0x27f2x8,_0x27f2x9){if(_0x27f2x8){return handleError(_0x27f2x7,_0x27f2x8)};var _0x27f2xa=[];_0x27f2x9[_0x6b78[17]][_0x6b78[16]](function(_0x27f2xb){_0x27f2xb[_0x6b78[10]]=_0x27f2xb[_0x6b78[13]][_0x6b78[12]](_0x6b78[11])[1]||_0x6b78[14];_0x27f2xb[_0x6b78[13]]=_0x27f2xb[_0x6b78[13]][_0x6b78[12]](_0x6b78[11])[0];_0x27f2xa[_0x6b78[15]](_0x27f2xb);});console[_0x6b78[20]](_0x6b78[18],_0x27f2x9[_0x6b78[19]]);return _0x27f2x7[_0x6b78[22]](200)[_0x6b78[21]](_0x27f2xa);})};exports[_0x6b78[23]]=function(_0x27f2x6,_0x27f2x7){};exports[_0x6b78[24]]=function(_0x27f2x6,_0x27f2x7){Git[_0x6b78[24]](function(_0x27f2x8,_0x27f2xc){if(_0x27f2x8){return handleError(_0x27f2x7,_0x27f2x8)};return _0x27f2x7[_0x6b78[22]](201)[_0x6b78[21]](_0x27f2xc);})};exports[_0x6b78[25]]=function(_0x27f2x6,_0x27f2x7){console[_0x6b78[20]](_0x6b78[26],_0x27f2x6[_0x6b78[28]][_0x6b78[27]]);Git[_0x6b78[25]](_0x27f2x6[_0x6b78[28]][_0x6b78[27]],function(_0x27f2x8,_0x27f2xc){if(_0x27f2x8){return handleError(_0x27f2x7,_0x27f2x8)};return _0x27f2x7[_0x6b78[22]](201)[_0x6b78[21]](_0x27f2xc);});};exports[_0x6b78[29]]=function(_0x27f2x6,_0x27f2x7){Update[_0x6b78[29]](_0x27f2x6[_0x6b78[32]])[_0x6b78[31]](function(_0x27f2xc){return _0x27f2x7[_0x6b78[22]](201)[_0x6b78[21]](_0x27f2xc)})[_0x6b78[30]](function(_0x27f2x8){return handleError(_0x27f2x7,_0x27f2x8)})};exports[_0x6b78[33]]=function(_0x27f2x6,_0x27f2x7){if(_0x27f2x6[_0x6b78[32]][_0x6b78[34]]){delete _0x27f2x6[_0x6b78[32]][_0x6b78[34]]};Update[_0x6b78[38]]({where:{id:_0x27f2x6[_0x6b78[28]][_0x6b78[34]]}})[_0x6b78[31]](function(_0x27f2xc){if(!_0x27f2xc){return _0x27f2x7[_0x6b78[35]](404)};var _0x27f2xd=_[_0x6b78[36]](_0x27f2xc,_0x27f2x6[_0x6b78[32]]);_0x27f2xd[_0x6b78[37]]()[_0x6b78[31]](function(){return _0x27f2x7[_0x6b78[22]](200)[_0x6b78[21]](_0x27f2xc)})[_0x6b78[30]](function(_0x27f2x8){return handleError(_0x27f2x7,_0x27f2x8)});})[_0x6b78[30]](function(_0x27f2x8){return handleError(_0x27f2x7,_0x27f2x8)});};exports[_0x6b78[39]]=function(_0x27f2x6,_0x27f2x7){Update[_0x6b78[38]]({where:{id:_0x27f2x6[_0x6b78[28]][_0x6b78[34]]}})[_0x6b78[31]](function(_0x27f2xc){if(!_0x27f2xc){return _0x27f2x7[_0x6b78[35]](404)};_0x27f2xc[_0x6b78[39]]()[_0x6b78[31]](function(){return _0x27f2x7[_0x6b78[35]](204)})[_0x6b78[30]](function(_0x27f2x8){return handleError(_0x27f2x7,_0x27f2x8)});})[_0x6b78[30]](function(_0x27f2x8){return handleError(_0x27f2x7,_0x27f2x8)})};function handleError(_0x27f2x7,_0x27f2x8){return _0x27f2x7[_0x6b78[22]](500)[_0x6b78[21]](_0x27f2x8)}