Built motion from commit 95c3d5ad5.|1.0.29
[motion.git] / server / api / sugarcrm_configuration / sugarcrm_configuration.controller.js
index 02c86dd..532b42f 100644 (file)
@@ -1 +1 @@
-var _0x3860=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x53\x75\x67\x61\x72\x63\x72\x6D\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x53\x75\x67\x61\x72\x63\x72\x6D\x46\x69\x65\x6C\x64","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\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","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x53\x75\x62\x6A\x65\x63\x74","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x46\x69\x65\x6C\x64","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x46\x69\x65\x6C\x64","\x73\x70\x72\x65\x61\x64","\x61\x64\x64\x53\x75\x62\x6A\x65\x63\x74","\x73\x75\x62\x6A\x65\x63\x74","\x61\x64\x64\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x61\x64\x64\x46\x69\x65\x6C\x64","\x66\x69\x65\x6C\x64","\x74\x79\x70\x65"];_0x3860[0];var _=require(_0x3860[1]);var SugarcrmConfiguration=require(_0x3860[3])[_0x3860[2]];var SugarcrmField=require(_0x3860[3])[_0x3860[4]];function handleError(_0x6226x5,_0x6226x6){_0x6226x6= _0x6226x6|| 500;return function(_0x6226x7){_0x6226x5[_0x3860[6]](_0x6226x6)[_0x3860[5]](_0x6226x7)}}function responseWithResult(_0x6226x5,_0x6226x6){_0x6226x6= _0x6226x6|| 200;return function(_0x6226x9){if(_0x6226x9){_0x6226x5[_0x3860[6]](_0x6226x6)[_0x3860[7]](_0x6226x9)}}}function handleEntityNotFound(_0x6226x5){return function(_0x6226x9){if(!_0x6226x9){_0x6226x5[_0x3860[6]](404)[_0x3860[8]]();return null};return _0x6226x9}}function saveUpdates(_0x6226xc){return function(_0x6226x9){return _0x6226x9[_0x3860[10]](_0x6226xc)[_0x3860[9]](function(_0x6226xd){return _0x6226xd})}}function removeEntity(_0x6226x5){return function(_0x6226x9){if(_0x6226x9){return _0x6226x9[_0x3860[11]]()[_0x3860[9]](function(){_0x6226x5[_0x3860[6]](204)[_0x3860[8]]()})}}}exports[_0x3860[12]]= function(_0x6226xf,_0x6226x5){SugarcrmConfiguration[_0x3860[15]]({where:_0x6226xf[_0x3860[14]]})[_0x3860[9]](responseWithResult(_0x6226x5))[_0x3860[13]](handleError(_0x6226x5))};exports[_0x3860[16]]= function(_0x6226xf,_0x6226x5){SugarcrmConfiguration[_0x3860[22]]({where:{id:_0x6226xf[_0x3860[18]][_0x3860[17]]},include:[{model:SugarcrmField,as:_0x3860[19]},{model:SugarcrmField,as:_0x3860[20]},{model:SugarcrmField,as:_0x3860[21]}]})[_0x3860[9]](handleEntityNotFound(_0x6226x5))[_0x3860[9]](responseWithResult(_0x6226x5))[_0x3860[13]](handleError(_0x6226x5))};exports[_0x3860[23]]= function(_0x6226xf,_0x6226x5){SugarcrmConfiguration[_0x3860[23]](_0x6226xf[_0x3860[24]])[_0x3860[9]](responseWithResult(_0x6226x5,201))[_0x3860[13]](handleError(_0x6226x5))};exports[_0x3860[25]]= function(_0x6226xf,_0x6226x5){if(_0x6226xf[_0x3860[24]][_0x3860[17]]){delete _0x6226xf[_0x3860[24]][_0x3860[17]]};SugarcrmConfiguration[_0x3860[26]](_0x6226xf[_0x3860[18]][_0x3860[17]])[_0x3860[9]](handleEntityNotFound(_0x6226x5))[_0x3860[9]](saveUpdates(_0x6226xf[_0x3860[24]]))[_0x3860[9]](responseWithResult(_0x6226x5))[_0x3860[13]](handleError(_0x6226x5))};exports[_0x3860[11]]= function(_0x6226xf,_0x6226x5){SugarcrmConfiguration[_0x3860[26]](_0x6226xf[_0x3860[18]][_0x3860[17]])[_0x3860[9]](handleEntityNotFound(_0x6226x5))[_0x3860[9]](removeEntity(_0x6226x5))[_0x3860[13]](handleError(_0x6226x5))};exports[_0x3860[27]]= function(_0x6226xf,_0x6226x5,_0x6226x10){var _0x6226x11;SugarcrmConfiguration[_0x3860[26]](_0x6226xf[_0x3860[18]][_0x3860[17]])[_0x3860[9]](handleEntityNotFound(_0x6226x5))[_0x3860[9]](function(_0x6226x14){_0x6226x11= _0x6226x14;return SugarcrmField[_0x3860[23]](_0x6226xf[_0x3860[24]])})[_0x3860[9]](function(_0x6226x13){switch(_0x6226xf[_0x3860[18]][_0x3860[35]]){case _0x3860[30]:return [_0x6226x11[_0x3860[29]](_0x6226x13),_0x6226x13];case _0x3860[32]:return [_0x6226x11[_0x3860[31]](_0x6226x13),_0x6226x13];case _0x3860[34]:return [_0x6226x11[_0x3860[33]](_0x6226x13),_0x6226x13]}})[_0x3860[28]](function(_0x6226x12,_0x6226x13){return _0x6226x5[_0x3860[6]](201)[_0x3860[7]](_0x6226x13)})[_0x3860[13]](handleError(_0x6226x5))}
\ No newline at end of file
+var _0xcb61=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\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","\x53\x75\x67\x61\x72\x63\x72\x6D\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x53\x75\x67\x61\x72\x63\x72\x6D\x46\x69\x65\x6C\x64","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\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","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x53\x75\x62\x6A\x65\x63\x74","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x46\x69\x65\x6C\x64","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x46\x69\x65\x6C\x64","\x73\x70\x72\x65\x61\x64","\x61\x64\x64\x53\x75\x62\x6A\x65\x63\x74","\x73\x75\x62\x6A\x65\x63\x74","\x61\x64\x64\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x61\x64\x64\x46\x69\x65\x6C\x64","\x66\x69\x65\x6C\x64","\x74\x79\x70\x65"];_0xcb61[0];var _=require(_0xcb61[1]);var logger=require(_0xcb61[3])(_0xcb61[2]);var SugarcrmConfiguration=require(_0xcb61[5])[_0xcb61[4]];var SugarcrmField=require(_0xcb61[5])[_0xcb61[6]];function handleError(_0xbda5x6,_0xbda5x7){_0xbda5x7= _0xbda5x7|| 500;return function(_0xbda5x8){logger[_0xcb61[8]](_0xbda5x8[_0xcb61[7]]);_0xbda5x6[_0xcb61[10]](_0xbda5x7)[_0xcb61[9]](_0xbda5x8)}}function responseWithResult(_0xbda5x6,_0xbda5x7){_0xbda5x7= _0xbda5x7|| 200;return function(_0xbda5xa){if(_0xbda5xa){_0xbda5x6[_0xcb61[10]](_0xbda5x7)[_0xcb61[11]](_0xbda5xa)}}}function handleEntityNotFound(_0xbda5x6){return function(_0xbda5xa){if(!_0xbda5xa){_0xbda5x6[_0xcb61[10]](404)[_0xcb61[12]]();return null};return _0xbda5xa}}function saveUpdates(_0xbda5xd){return function(_0xbda5xa){return _0xbda5xa[_0xcb61[14]](_0xbda5xd)[_0xcb61[13]](function(_0xbda5xe){return _0xbda5xe})}}function removeEntity(_0xbda5x6){return function(_0xbda5xa){if(_0xbda5xa){return _0xbda5xa[_0xcb61[15]]()[_0xcb61[13]](function(){_0xbda5x6[_0xcb61[10]](204)[_0xcb61[12]]()})}}}exports[_0xcb61[16]]= function(_0xbda5x10,_0xbda5x6){SugarcrmConfiguration[_0xcb61[19]]({where:_0xbda5x10[_0xcb61[18]]})[_0xcb61[13]](responseWithResult(_0xbda5x6))[_0xcb61[17]](handleError(_0xbda5x6))};exports[_0xcb61[20]]= function(_0xbda5x10,_0xbda5x6){SugarcrmConfiguration[_0xcb61[26]]({where:{id:_0xbda5x10[_0xcb61[22]][_0xcb61[21]]},include:[{model:SugarcrmField,as:_0xcb61[23]},{model:SugarcrmField,as:_0xcb61[24]},{model:SugarcrmField,as:_0xcb61[25]}]})[_0xcb61[13]](handleEntityNotFound(_0xbda5x6))[_0xcb61[13]](responseWithResult(_0xbda5x6))[_0xcb61[17]](handleError(_0xbda5x6))};exports[_0xcb61[27]]= function(_0xbda5x10,_0xbda5x6){SugarcrmConfiguration[_0xcb61[27]](_0xbda5x10[_0xcb61[28]])[_0xcb61[13]](responseWithResult(_0xbda5x6,201))[_0xcb61[17]](handleError(_0xbda5x6))};exports[_0xcb61[29]]= function(_0xbda5x10,_0xbda5x6){if(_0xbda5x10[_0xcb61[28]][_0xcb61[21]]){delete _0xbda5x10[_0xcb61[28]][_0xcb61[21]]};SugarcrmConfiguration[_0xcb61[30]](_0xbda5x10[_0xcb61[22]][_0xcb61[21]])[_0xcb61[13]](handleEntityNotFound(_0xbda5x6))[_0xcb61[13]](saveUpdates(_0xbda5x10[_0xcb61[28]]))[_0xcb61[13]](responseWithResult(_0xbda5x6))[_0xcb61[17]](handleError(_0xbda5x6))};exports[_0xcb61[15]]= function(_0xbda5x10,_0xbda5x6){SugarcrmConfiguration[_0xcb61[30]](_0xbda5x10[_0xcb61[22]][_0xcb61[21]])[_0xcb61[13]](handleEntityNotFound(_0xbda5x6))[_0xcb61[13]](removeEntity(_0xbda5x6))[_0xcb61[17]](handleError(_0xbda5x6))};exports[_0xcb61[31]]= function(_0xbda5x10,_0xbda5x6,_0xbda5x11){var _0xbda5x12;SugarcrmConfiguration[_0xcb61[30]](_0xbda5x10[_0xcb61[22]][_0xcb61[21]])[_0xcb61[13]](handleEntityNotFound(_0xbda5x6))[_0xcb61[13]](function(_0xbda5x15){_0xbda5x12= _0xbda5x15;return SugarcrmField[_0xcb61[27]](_0xbda5x10[_0xcb61[28]])})[_0xcb61[13]](function(_0xbda5x14){switch(_0xbda5x10[_0xcb61[22]][_0xcb61[39]]){case _0xcb61[34]:return [_0xbda5x12[_0xcb61[33]](_0xbda5x14),_0xbda5x14];case _0xcb61[36]:return [_0xbda5x12[_0xcb61[35]](_0xbda5x14),_0xbda5x14];case _0xcb61[38]:return [_0xbda5x12[_0xcb61[37]](_0xbda5x14),_0xbda5x14]}})[_0xcb61[32]](function(_0xbda5x13,_0xbda5x14){return _0xbda5x6[_0xcb61[10]](201)[_0xcb61[11]](_0xbda5x14)})[_0xcb61[17]](handleError(_0xbda5x6))}
\ No newline at end of file