Built motion from commit 943eae279.|1.0.24
[motion.git] / server / api / sugarcrm_configuration / sugarcrm_configuration.controller.js
index 3115be7..729cd3e 100644 (file)
@@ -1 +1 @@
-var _0x1660=["\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"];_0x1660[0];var _=require(_0x1660[1]);var logger=require(_0x1660[3])(_0x1660[2]);var SugarcrmConfiguration=require(_0x1660[5])[_0x1660[4]];var SugarcrmField=require(_0x1660[5])[_0x1660[6]];function handleError(_0x1f6fx6,_0x1f6fx7){_0x1f6fx7= _0x1f6fx7|| 500;return function(_0x1f6fx8){logger[_0x1660[8]](_0x1f6fx8[_0x1660[7]]);_0x1f6fx6[_0x1660[10]](_0x1f6fx7)[_0x1660[9]](_0x1f6fx8)}}function responseWithResult(_0x1f6fx6,_0x1f6fx7){_0x1f6fx7= _0x1f6fx7|| 200;return function(_0x1f6fxa){if(_0x1f6fxa){_0x1f6fx6[_0x1660[10]](_0x1f6fx7)[_0x1660[11]](_0x1f6fxa)}}}function handleEntityNotFound(_0x1f6fx6){return function(_0x1f6fxa){if(!_0x1f6fxa){_0x1f6fx6[_0x1660[10]](404)[_0x1660[12]]();return null};return _0x1f6fxa}}function saveUpdates(_0x1f6fxd){return function(_0x1f6fxa){return _0x1f6fxa[_0x1660[14]](_0x1f6fxd)[_0x1660[13]](function(_0x1f6fxe){return _0x1f6fxe})}}function removeEntity(_0x1f6fx6){return function(_0x1f6fxa){if(_0x1f6fxa){return _0x1f6fxa[_0x1660[15]]()[_0x1660[13]](function(){_0x1f6fx6[_0x1660[10]](204)[_0x1660[12]]()})}}}exports[_0x1660[16]]= function(_0x1f6fx10,_0x1f6fx6){SugarcrmConfiguration[_0x1660[19]]({where:_0x1f6fx10[_0x1660[18]]})[_0x1660[13]](responseWithResult(_0x1f6fx6))[_0x1660[17]](handleError(_0x1f6fx6))};exports[_0x1660[20]]= function(_0x1f6fx10,_0x1f6fx6){SugarcrmConfiguration[_0x1660[26]]({where:{id:_0x1f6fx10[_0x1660[22]][_0x1660[21]]},include:[{model:SugarcrmField,as:_0x1660[23]},{model:SugarcrmField,as:_0x1660[24]},{model:SugarcrmField,as:_0x1660[25]}]})[_0x1660[13]](handleEntityNotFound(_0x1f6fx6))[_0x1660[13]](responseWithResult(_0x1f6fx6))[_0x1660[17]](handleError(_0x1f6fx6))};exports[_0x1660[27]]= function(_0x1f6fx10,_0x1f6fx6){SugarcrmConfiguration[_0x1660[27]](_0x1f6fx10[_0x1660[28]])[_0x1660[13]](responseWithResult(_0x1f6fx6,201))[_0x1660[17]](handleError(_0x1f6fx6))};exports[_0x1660[29]]= function(_0x1f6fx10,_0x1f6fx6){if(_0x1f6fx10[_0x1660[28]][_0x1660[21]]){delete _0x1f6fx10[_0x1660[28]][_0x1660[21]]};SugarcrmConfiguration[_0x1660[30]](_0x1f6fx10[_0x1660[22]][_0x1660[21]])[_0x1660[13]](handleEntityNotFound(_0x1f6fx6))[_0x1660[13]](saveUpdates(_0x1f6fx10[_0x1660[28]]))[_0x1660[13]](responseWithResult(_0x1f6fx6))[_0x1660[17]](handleError(_0x1f6fx6))};exports[_0x1660[15]]= function(_0x1f6fx10,_0x1f6fx6){SugarcrmConfiguration[_0x1660[30]](_0x1f6fx10[_0x1660[22]][_0x1660[21]])[_0x1660[13]](handleEntityNotFound(_0x1f6fx6))[_0x1660[13]](removeEntity(_0x1f6fx6))[_0x1660[17]](handleError(_0x1f6fx6))};exports[_0x1660[31]]= function(_0x1f6fx10,_0x1f6fx6,_0x1f6fx11){var _0x1f6fx12;SugarcrmConfiguration[_0x1660[30]](_0x1f6fx10[_0x1660[22]][_0x1660[21]])[_0x1660[13]](handleEntityNotFound(_0x1f6fx6))[_0x1660[13]](function(_0x1f6fx15){_0x1f6fx12= _0x1f6fx15;return SugarcrmField[_0x1660[27]](_0x1f6fx10[_0x1660[28]])})[_0x1660[13]](function(_0x1f6fx14){switch(_0x1f6fx10[_0x1660[22]][_0x1660[39]]){case _0x1660[34]:return [_0x1f6fx12[_0x1660[33]](_0x1f6fx14),_0x1f6fx14];case _0x1660[36]:return [_0x1f6fx12[_0x1660[35]](_0x1f6fx14),_0x1f6fx14];case _0x1660[38]:return [_0x1f6fx12[_0x1660[37]](_0x1f6fx14),_0x1f6fx14]}})[_0x1660[32]](function(_0x1f6fx13,_0x1f6fx14){return _0x1f6fx6[_0x1660[10]](201)[_0x1660[11]](_0x1f6fx14)})[_0x1660[17]](handleError(_0x1f6fx6))}
\ No newline at end of file
+var _0xe953=["\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"];_0xe953[0];var _=require(_0xe953[1]);var logger=require(_0xe953[3])(_0xe953[2]);var SugarcrmConfiguration=require(_0xe953[5])[_0xe953[4]];var SugarcrmField=require(_0xe953[5])[_0xe953[6]];function handleError(_0xcb50x6,_0xcb50x7){_0xcb50x7= _0xcb50x7|| 500;return function(_0xcb50x8){logger[_0xe953[8]](_0xcb50x8[_0xe953[7]]);_0xcb50x6[_0xe953[10]](_0xcb50x7)[_0xe953[9]](_0xcb50x8)}}function responseWithResult(_0xcb50x6,_0xcb50x7){_0xcb50x7= _0xcb50x7|| 200;return function(_0xcb50xa){if(_0xcb50xa){_0xcb50x6[_0xe953[10]](_0xcb50x7)[_0xe953[11]](_0xcb50xa)}}}function handleEntityNotFound(_0xcb50x6){return function(_0xcb50xa){if(!_0xcb50xa){_0xcb50x6[_0xe953[10]](404)[_0xe953[12]]();return null};return _0xcb50xa}}function saveUpdates(_0xcb50xd){return function(_0xcb50xa){return _0xcb50xa[_0xe953[14]](_0xcb50xd)[_0xe953[13]](function(_0xcb50xe){return _0xcb50xe})}}function removeEntity(_0xcb50x6){return function(_0xcb50xa){if(_0xcb50xa){return _0xcb50xa[_0xe953[15]]()[_0xe953[13]](function(){_0xcb50x6[_0xe953[10]](204)[_0xe953[12]]()})}}}exports[_0xe953[16]]= function(_0xcb50x10,_0xcb50x6){SugarcrmConfiguration[_0xe953[19]]({where:_0xcb50x10[_0xe953[18]]})[_0xe953[13]](responseWithResult(_0xcb50x6))[_0xe953[17]](handleError(_0xcb50x6))};exports[_0xe953[20]]= function(_0xcb50x10,_0xcb50x6){SugarcrmConfiguration[_0xe953[26]]({where:{id:_0xcb50x10[_0xe953[22]][_0xe953[21]]},include:[{model:SugarcrmField,as:_0xe953[23]},{model:SugarcrmField,as:_0xe953[24]},{model:SugarcrmField,as:_0xe953[25]}]})[_0xe953[13]](handleEntityNotFound(_0xcb50x6))[_0xe953[13]](responseWithResult(_0xcb50x6))[_0xe953[17]](handleError(_0xcb50x6))};exports[_0xe953[27]]= function(_0xcb50x10,_0xcb50x6){SugarcrmConfiguration[_0xe953[27]](_0xcb50x10[_0xe953[28]])[_0xe953[13]](responseWithResult(_0xcb50x6,201))[_0xe953[17]](handleError(_0xcb50x6))};exports[_0xe953[29]]= function(_0xcb50x10,_0xcb50x6){if(_0xcb50x10[_0xe953[28]][_0xe953[21]]){delete _0xcb50x10[_0xe953[28]][_0xe953[21]]};SugarcrmConfiguration[_0xe953[30]](_0xcb50x10[_0xe953[22]][_0xe953[21]])[_0xe953[13]](handleEntityNotFound(_0xcb50x6))[_0xe953[13]](saveUpdates(_0xcb50x10[_0xe953[28]]))[_0xe953[13]](responseWithResult(_0xcb50x6))[_0xe953[17]](handleError(_0xcb50x6))};exports[_0xe953[15]]= function(_0xcb50x10,_0xcb50x6){SugarcrmConfiguration[_0xe953[30]](_0xcb50x10[_0xe953[22]][_0xe953[21]])[_0xe953[13]](handleEntityNotFound(_0xcb50x6))[_0xe953[13]](removeEntity(_0xcb50x6))[_0xe953[17]](handleError(_0xcb50x6))};exports[_0xe953[31]]= function(_0xcb50x10,_0xcb50x6,_0xcb50x11){var _0xcb50x12;SugarcrmConfiguration[_0xe953[30]](_0xcb50x10[_0xe953[22]][_0xe953[21]])[_0xe953[13]](handleEntityNotFound(_0xcb50x6))[_0xe953[13]](function(_0xcb50x15){_0xcb50x12= _0xcb50x15;return SugarcrmField[_0xe953[27]](_0xcb50x10[_0xe953[28]])})[_0xe953[13]](function(_0xcb50x14){switch(_0xcb50x10[_0xe953[22]][_0xe953[39]]){case _0xe953[34]:return [_0xcb50x12[_0xe953[33]](_0xcb50x14),_0xcb50x14];case _0xe953[36]:return [_0xcb50x12[_0xe953[35]](_0xcb50x14),_0xcb50x14];case _0xe953[38]:return [_0xcb50x12[_0xe953[37]](_0xcb50x14),_0xcb50x14]}})[_0xe953[32]](function(_0xcb50x13,_0xcb50x14){return _0xcb50x6[_0xe953[10]](201)[_0xe953[11]](_0xcb50x14)})[_0xe953[17]](handleError(_0xcb50x6))}
\ No newline at end of file