Built motion from commit 55324429e.|1.0.25
[motion.git] / server / api / sugarcrm_configuration / sugarcrm_configuration.controller.js
index 62040bc..93fe0e6 100644 (file)
@@ -1 +1 @@
-var _0x8a78=["\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"];_0x8a78[0];var _=require(_0x8a78[1]);var logger=require(_0x8a78[3])(_0x8a78[2]);var SugarcrmConfiguration=require(_0x8a78[5])[_0x8a78[4]];var SugarcrmField=require(_0x8a78[5])[_0x8a78[6]];function handleError(_0x7b9cx6,_0x7b9cx7){_0x7b9cx7= _0x7b9cx7|| 500;return function(_0x7b9cx8){logger[_0x8a78[8]](_0x7b9cx8[_0x8a78[7]]);_0x7b9cx6[_0x8a78[10]](_0x7b9cx7)[_0x8a78[9]](_0x7b9cx8)}}function responseWithResult(_0x7b9cx6,_0x7b9cx7){_0x7b9cx7= _0x7b9cx7|| 200;return function(_0x7b9cxa){if(_0x7b9cxa){_0x7b9cx6[_0x8a78[10]](_0x7b9cx7)[_0x8a78[11]](_0x7b9cxa)}}}function handleEntityNotFound(_0x7b9cx6){return function(_0x7b9cxa){if(!_0x7b9cxa){_0x7b9cx6[_0x8a78[10]](404)[_0x8a78[12]]();return null};return _0x7b9cxa}}function saveUpdates(_0x7b9cxd){return function(_0x7b9cxa){return _0x7b9cxa[_0x8a78[14]](_0x7b9cxd)[_0x8a78[13]](function(_0x7b9cxe){return _0x7b9cxe})}}function removeEntity(_0x7b9cx6){return function(_0x7b9cxa){if(_0x7b9cxa){return _0x7b9cxa[_0x8a78[15]]()[_0x8a78[13]](function(){_0x7b9cx6[_0x8a78[10]](204)[_0x8a78[12]]()})}}}exports[_0x8a78[16]]= function(_0x7b9cx10,_0x7b9cx6){SugarcrmConfiguration[_0x8a78[19]]({where:_0x7b9cx10[_0x8a78[18]]})[_0x8a78[13]](responseWithResult(_0x7b9cx6))[_0x8a78[17]](handleError(_0x7b9cx6))};exports[_0x8a78[20]]= function(_0x7b9cx10,_0x7b9cx6){SugarcrmConfiguration[_0x8a78[26]]({where:{id:_0x7b9cx10[_0x8a78[22]][_0x8a78[21]]},include:[{model:SugarcrmField,as:_0x8a78[23]},{model:SugarcrmField,as:_0x8a78[24]},{model:SugarcrmField,as:_0x8a78[25]}]})[_0x8a78[13]](handleEntityNotFound(_0x7b9cx6))[_0x8a78[13]](responseWithResult(_0x7b9cx6))[_0x8a78[17]](handleError(_0x7b9cx6))};exports[_0x8a78[27]]= function(_0x7b9cx10,_0x7b9cx6){SugarcrmConfiguration[_0x8a78[27]](_0x7b9cx10[_0x8a78[28]])[_0x8a78[13]](responseWithResult(_0x7b9cx6,201))[_0x8a78[17]](handleError(_0x7b9cx6))};exports[_0x8a78[29]]= function(_0x7b9cx10,_0x7b9cx6){if(_0x7b9cx10[_0x8a78[28]][_0x8a78[21]]){delete _0x7b9cx10[_0x8a78[28]][_0x8a78[21]]};SugarcrmConfiguration[_0x8a78[30]](_0x7b9cx10[_0x8a78[22]][_0x8a78[21]])[_0x8a78[13]](handleEntityNotFound(_0x7b9cx6))[_0x8a78[13]](saveUpdates(_0x7b9cx10[_0x8a78[28]]))[_0x8a78[13]](responseWithResult(_0x7b9cx6))[_0x8a78[17]](handleError(_0x7b9cx6))};exports[_0x8a78[15]]= function(_0x7b9cx10,_0x7b9cx6){SugarcrmConfiguration[_0x8a78[30]](_0x7b9cx10[_0x8a78[22]][_0x8a78[21]])[_0x8a78[13]](handleEntityNotFound(_0x7b9cx6))[_0x8a78[13]](removeEntity(_0x7b9cx6))[_0x8a78[17]](handleError(_0x7b9cx6))};exports[_0x8a78[31]]= function(_0x7b9cx10,_0x7b9cx6,_0x7b9cx11){var _0x7b9cx12;SugarcrmConfiguration[_0x8a78[30]](_0x7b9cx10[_0x8a78[22]][_0x8a78[21]])[_0x8a78[13]](handleEntityNotFound(_0x7b9cx6))[_0x8a78[13]](function(_0x7b9cx15){_0x7b9cx12= _0x7b9cx15;return SugarcrmField[_0x8a78[27]](_0x7b9cx10[_0x8a78[28]])})[_0x8a78[13]](function(_0x7b9cx14){switch(_0x7b9cx10[_0x8a78[22]][_0x8a78[39]]){case _0x8a78[34]:return [_0x7b9cx12[_0x8a78[33]](_0x7b9cx14),_0x7b9cx14];case _0x8a78[36]:return [_0x7b9cx12[_0x8a78[35]](_0x7b9cx14),_0x7b9cx14];case _0x8a78[38]:return [_0x7b9cx12[_0x8a78[37]](_0x7b9cx14),_0x7b9cx14]}})[_0x8a78[32]](function(_0x7b9cx13,_0x7b9cx14){return _0x7b9cx6[_0x8a78[10]](201)[_0x8a78[11]](_0x7b9cx14)})[_0x8a78[17]](handleError(_0x7b9cx6))}
\ No newline at end of file
+var _0x95de=["\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"];_0x95de[0];var _=require(_0x95de[1]);var logger=require(_0x95de[3])(_0x95de[2]);var SugarcrmConfiguration=require(_0x95de[5])[_0x95de[4]];var SugarcrmField=require(_0x95de[5])[_0x95de[6]];function handleError(_0xf2e0x6,_0xf2e0x7){_0xf2e0x7= _0xf2e0x7|| 500;return function(_0xf2e0x8){logger[_0x95de[8]](_0xf2e0x8[_0x95de[7]]);_0xf2e0x6[_0x95de[10]](_0xf2e0x7)[_0x95de[9]](_0xf2e0x8)}}function responseWithResult(_0xf2e0x6,_0xf2e0x7){_0xf2e0x7= _0xf2e0x7|| 200;return function(_0xf2e0xa){if(_0xf2e0xa){_0xf2e0x6[_0x95de[10]](_0xf2e0x7)[_0x95de[11]](_0xf2e0xa)}}}function handleEntityNotFound(_0xf2e0x6){return function(_0xf2e0xa){if(!_0xf2e0xa){_0xf2e0x6[_0x95de[10]](404)[_0x95de[12]]();return null};return _0xf2e0xa}}function saveUpdates(_0xf2e0xd){return function(_0xf2e0xa){return _0xf2e0xa[_0x95de[14]](_0xf2e0xd)[_0x95de[13]](function(_0xf2e0xe){return _0xf2e0xe})}}function removeEntity(_0xf2e0x6){return function(_0xf2e0xa){if(_0xf2e0xa){return _0xf2e0xa[_0x95de[15]]()[_0x95de[13]](function(){_0xf2e0x6[_0x95de[10]](204)[_0x95de[12]]()})}}}exports[_0x95de[16]]= function(_0xf2e0x10,_0xf2e0x6){SugarcrmConfiguration[_0x95de[19]]({where:_0xf2e0x10[_0x95de[18]]})[_0x95de[13]](responseWithResult(_0xf2e0x6))[_0x95de[17]](handleError(_0xf2e0x6))};exports[_0x95de[20]]= function(_0xf2e0x10,_0xf2e0x6){SugarcrmConfiguration[_0x95de[26]]({where:{id:_0xf2e0x10[_0x95de[22]][_0x95de[21]]},include:[{model:SugarcrmField,as:_0x95de[23]},{model:SugarcrmField,as:_0x95de[24]},{model:SugarcrmField,as:_0x95de[25]}]})[_0x95de[13]](handleEntityNotFound(_0xf2e0x6))[_0x95de[13]](responseWithResult(_0xf2e0x6))[_0x95de[17]](handleError(_0xf2e0x6))};exports[_0x95de[27]]= function(_0xf2e0x10,_0xf2e0x6){SugarcrmConfiguration[_0x95de[27]](_0xf2e0x10[_0x95de[28]])[_0x95de[13]](responseWithResult(_0xf2e0x6,201))[_0x95de[17]](handleError(_0xf2e0x6))};exports[_0x95de[29]]= function(_0xf2e0x10,_0xf2e0x6){if(_0xf2e0x10[_0x95de[28]][_0x95de[21]]){delete _0xf2e0x10[_0x95de[28]][_0x95de[21]]};SugarcrmConfiguration[_0x95de[30]](_0xf2e0x10[_0x95de[22]][_0x95de[21]])[_0x95de[13]](handleEntityNotFound(_0xf2e0x6))[_0x95de[13]](saveUpdates(_0xf2e0x10[_0x95de[28]]))[_0x95de[13]](responseWithResult(_0xf2e0x6))[_0x95de[17]](handleError(_0xf2e0x6))};exports[_0x95de[15]]= function(_0xf2e0x10,_0xf2e0x6){SugarcrmConfiguration[_0x95de[30]](_0xf2e0x10[_0x95de[22]][_0x95de[21]])[_0x95de[13]](handleEntityNotFound(_0xf2e0x6))[_0x95de[13]](removeEntity(_0xf2e0x6))[_0x95de[17]](handleError(_0xf2e0x6))};exports[_0x95de[31]]= function(_0xf2e0x10,_0xf2e0x6,_0xf2e0x11){var _0xf2e0x12;SugarcrmConfiguration[_0x95de[30]](_0xf2e0x10[_0x95de[22]][_0x95de[21]])[_0x95de[13]](handleEntityNotFound(_0xf2e0x6))[_0x95de[13]](function(_0xf2e0x15){_0xf2e0x12= _0xf2e0x15;return SugarcrmField[_0x95de[27]](_0xf2e0x10[_0x95de[28]])})[_0x95de[13]](function(_0xf2e0x14){switch(_0xf2e0x10[_0x95de[22]][_0x95de[39]]){case _0x95de[34]:return [_0xf2e0x12[_0x95de[33]](_0xf2e0x14),_0xf2e0x14];case _0x95de[36]:return [_0xf2e0x12[_0x95de[35]](_0xf2e0x14),_0xf2e0x14];case _0x95de[38]:return [_0xf2e0x12[_0x95de[37]](_0xf2e0x14),_0xf2e0x14]}})[_0x95de[32]](function(_0xf2e0x13,_0xf2e0x14){return _0xf2e0x6[_0x95de[10]](201)[_0x95de[11]](_0xf2e0x14)})[_0x95de[17]](handleError(_0xf2e0x6))}
\ No newline at end of file