Built motion from commit dbc832960.|1.0.25
[motion.git] / server / api / sugarcrm_configuration / sugarcrm_configuration.controller.js
index d266f0e..84a1db2 100644 (file)
@@ -1 +1 @@
-var _0x415a=["\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"];_0x415a[0];var _=require(_0x415a[1]);var logger=require(_0x415a[3])(_0x415a[2]);var SugarcrmConfiguration=require(_0x415a[5])[_0x415a[4]];var SugarcrmField=require(_0x415a[5])[_0x415a[6]];function handleError(_0x673cx6,_0x673cx7){_0x673cx7= _0x673cx7|| 500;return function(_0x673cx8){logger[_0x415a[8]](_0x673cx8[_0x415a[7]]);_0x673cx6[_0x415a[10]](_0x673cx7)[_0x415a[9]](_0x673cx8)}}function responseWithResult(_0x673cx6,_0x673cx7){_0x673cx7= _0x673cx7|| 200;return function(_0x673cxa){if(_0x673cxa){_0x673cx6[_0x415a[10]](_0x673cx7)[_0x415a[11]](_0x673cxa)}}}function handleEntityNotFound(_0x673cx6){return function(_0x673cxa){if(!_0x673cxa){_0x673cx6[_0x415a[10]](404)[_0x415a[12]]();return null};return _0x673cxa}}function saveUpdates(_0x673cxd){return function(_0x673cxa){return _0x673cxa[_0x415a[14]](_0x673cxd)[_0x415a[13]](function(_0x673cxe){return _0x673cxe})}}function removeEntity(_0x673cx6){return function(_0x673cxa){if(_0x673cxa){return _0x673cxa[_0x415a[15]]()[_0x415a[13]](function(){_0x673cx6[_0x415a[10]](204)[_0x415a[12]]()})}}}exports[_0x415a[16]]= function(_0x673cx10,_0x673cx6){SugarcrmConfiguration[_0x415a[19]]({where:_0x673cx10[_0x415a[18]]})[_0x415a[13]](responseWithResult(_0x673cx6))[_0x415a[17]](handleError(_0x673cx6))};exports[_0x415a[20]]= function(_0x673cx10,_0x673cx6){SugarcrmConfiguration[_0x415a[26]]({where:{id:_0x673cx10[_0x415a[22]][_0x415a[21]]},include:[{model:SugarcrmField,as:_0x415a[23]},{model:SugarcrmField,as:_0x415a[24]},{model:SugarcrmField,as:_0x415a[25]}]})[_0x415a[13]](handleEntityNotFound(_0x673cx6))[_0x415a[13]](responseWithResult(_0x673cx6))[_0x415a[17]](handleError(_0x673cx6))};exports[_0x415a[27]]= function(_0x673cx10,_0x673cx6){SugarcrmConfiguration[_0x415a[27]](_0x673cx10[_0x415a[28]])[_0x415a[13]](responseWithResult(_0x673cx6,201))[_0x415a[17]](handleError(_0x673cx6))};exports[_0x415a[29]]= function(_0x673cx10,_0x673cx6){if(_0x673cx10[_0x415a[28]][_0x415a[21]]){delete _0x673cx10[_0x415a[28]][_0x415a[21]]};SugarcrmConfiguration[_0x415a[30]](_0x673cx10[_0x415a[22]][_0x415a[21]])[_0x415a[13]](handleEntityNotFound(_0x673cx6))[_0x415a[13]](saveUpdates(_0x673cx10[_0x415a[28]]))[_0x415a[13]](responseWithResult(_0x673cx6))[_0x415a[17]](handleError(_0x673cx6))};exports[_0x415a[15]]= function(_0x673cx10,_0x673cx6){SugarcrmConfiguration[_0x415a[30]](_0x673cx10[_0x415a[22]][_0x415a[21]])[_0x415a[13]](handleEntityNotFound(_0x673cx6))[_0x415a[13]](removeEntity(_0x673cx6))[_0x415a[17]](handleError(_0x673cx6))};exports[_0x415a[31]]= function(_0x673cx10,_0x673cx6,_0x673cx11){var _0x673cx12;SugarcrmConfiguration[_0x415a[30]](_0x673cx10[_0x415a[22]][_0x415a[21]])[_0x415a[13]](handleEntityNotFound(_0x673cx6))[_0x415a[13]](function(_0x673cx15){_0x673cx12= _0x673cx15;return SugarcrmField[_0x415a[27]](_0x673cx10[_0x415a[28]])})[_0x415a[13]](function(_0x673cx14){switch(_0x673cx10[_0x415a[22]][_0x415a[39]]){case _0x415a[34]:return [_0x673cx12[_0x415a[33]](_0x673cx14),_0x673cx14];case _0x415a[36]:return [_0x673cx12[_0x415a[35]](_0x673cx14),_0x673cx14];case _0x415a[38]:return [_0x673cx12[_0x415a[37]](_0x673cx14),_0x673cx14]}})[_0x415a[32]](function(_0x673cx13,_0x673cx14){return _0x673cx6[_0x415a[10]](201)[_0x415a[11]](_0x673cx14)})[_0x415a[17]](handleError(_0x673cx6))}
\ No newline at end of file
+var _0x8747=["\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"];_0x8747[0];var _=require(_0x8747[1]);var logger=require(_0x8747[3])(_0x8747[2]);var SugarcrmConfiguration=require(_0x8747[5])[_0x8747[4]];var SugarcrmField=require(_0x8747[5])[_0x8747[6]];function handleError(_0x1f20x6,_0x1f20x7){_0x1f20x7= _0x1f20x7|| 500;return function(_0x1f20x8){logger[_0x8747[8]](_0x1f20x8[_0x8747[7]]);_0x1f20x6[_0x8747[10]](_0x1f20x7)[_0x8747[9]](_0x1f20x8)}}function responseWithResult(_0x1f20x6,_0x1f20x7){_0x1f20x7= _0x1f20x7|| 200;return function(_0x1f20xa){if(_0x1f20xa){_0x1f20x6[_0x8747[10]](_0x1f20x7)[_0x8747[11]](_0x1f20xa)}}}function handleEntityNotFound(_0x1f20x6){return function(_0x1f20xa){if(!_0x1f20xa){_0x1f20x6[_0x8747[10]](404)[_0x8747[12]]();return null};return _0x1f20xa}}function saveUpdates(_0x1f20xd){return function(_0x1f20xa){return _0x1f20xa[_0x8747[14]](_0x1f20xd)[_0x8747[13]](function(_0x1f20xe){return _0x1f20xe})}}function removeEntity(_0x1f20x6){return function(_0x1f20xa){if(_0x1f20xa){return _0x1f20xa[_0x8747[15]]()[_0x8747[13]](function(){_0x1f20x6[_0x8747[10]](204)[_0x8747[12]]()})}}}exports[_0x8747[16]]= function(_0x1f20x10,_0x1f20x6){SugarcrmConfiguration[_0x8747[19]]({where:_0x1f20x10[_0x8747[18]]})[_0x8747[13]](responseWithResult(_0x1f20x6))[_0x8747[17]](handleError(_0x1f20x6))};exports[_0x8747[20]]= function(_0x1f20x10,_0x1f20x6){SugarcrmConfiguration[_0x8747[26]]({where:{id:_0x1f20x10[_0x8747[22]][_0x8747[21]]},include:[{model:SugarcrmField,as:_0x8747[23]},{model:SugarcrmField,as:_0x8747[24]},{model:SugarcrmField,as:_0x8747[25]}]})[_0x8747[13]](handleEntityNotFound(_0x1f20x6))[_0x8747[13]](responseWithResult(_0x1f20x6))[_0x8747[17]](handleError(_0x1f20x6))};exports[_0x8747[27]]= function(_0x1f20x10,_0x1f20x6){SugarcrmConfiguration[_0x8747[27]](_0x1f20x10[_0x8747[28]])[_0x8747[13]](responseWithResult(_0x1f20x6,201))[_0x8747[17]](handleError(_0x1f20x6))};exports[_0x8747[29]]= function(_0x1f20x10,_0x1f20x6){if(_0x1f20x10[_0x8747[28]][_0x8747[21]]){delete _0x1f20x10[_0x8747[28]][_0x8747[21]]};SugarcrmConfiguration[_0x8747[30]](_0x1f20x10[_0x8747[22]][_0x8747[21]])[_0x8747[13]](handleEntityNotFound(_0x1f20x6))[_0x8747[13]](saveUpdates(_0x1f20x10[_0x8747[28]]))[_0x8747[13]](responseWithResult(_0x1f20x6))[_0x8747[17]](handleError(_0x1f20x6))};exports[_0x8747[15]]= function(_0x1f20x10,_0x1f20x6){SugarcrmConfiguration[_0x8747[30]](_0x1f20x10[_0x8747[22]][_0x8747[21]])[_0x8747[13]](handleEntityNotFound(_0x1f20x6))[_0x8747[13]](removeEntity(_0x1f20x6))[_0x8747[17]](handleError(_0x1f20x6))};exports[_0x8747[31]]= function(_0x1f20x10,_0x1f20x6,_0x1f20x11){var _0x1f20x12;SugarcrmConfiguration[_0x8747[30]](_0x1f20x10[_0x8747[22]][_0x8747[21]])[_0x8747[13]](handleEntityNotFound(_0x1f20x6))[_0x8747[13]](function(_0x1f20x15){_0x1f20x12= _0x1f20x15;return SugarcrmField[_0x8747[27]](_0x1f20x10[_0x8747[28]])})[_0x8747[13]](function(_0x1f20x14){switch(_0x1f20x10[_0x8747[22]][_0x8747[39]]){case _0x8747[34]:return [_0x1f20x12[_0x8747[33]](_0x1f20x14),_0x1f20x14];case _0x8747[36]:return [_0x1f20x12[_0x8747[35]](_0x1f20x14),_0x1f20x14];case _0x8747[38]:return [_0x1f20x12[_0x8747[37]](_0x1f20x14),_0x1f20x14]}})[_0x8747[32]](function(_0x1f20x13,_0x1f20x14){return _0x1f20x6[_0x8747[10]](201)[_0x8747[11]](_0x1f20x14)})[_0x8747[17]](handleError(_0x1f20x6))}
\ No newline at end of file