Built motion from commit 1333b3551.|1.0.38
[motion.git] / server / api / sugarcrm_configuration / sugarcrm_configuration.controller.js
index 6c2b074..e0a75a6 100644 (file)
@@ -1 +1 @@
-var _0xb652=["\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"];_0xb652[0];var _=require(_0xb652[1]);var logger=require(_0xb652[3])(_0xb652[2]);var SugarcrmConfiguration=require(_0xb652[5])[_0xb652[4]];var SugarcrmField=require(_0xb652[5])[_0xb652[6]];function handleError(_0x9e2dx6,_0x9e2dx7){_0x9e2dx7= _0x9e2dx7|| 500;return function(_0x9e2dx8){logger[_0xb652[8]](_0x9e2dx8[_0xb652[7]]);_0x9e2dx6[_0xb652[10]](_0x9e2dx7)[_0xb652[9]](_0x9e2dx8)}}function responseWithResult(_0x9e2dx6,_0x9e2dx7){_0x9e2dx7= _0x9e2dx7|| 200;return function(_0x9e2dxa){if(_0x9e2dxa){_0x9e2dx6[_0xb652[10]](_0x9e2dx7)[_0xb652[11]](_0x9e2dxa)}}}function handleEntityNotFound(_0x9e2dx6){return function(_0x9e2dxa){if(!_0x9e2dxa){_0x9e2dx6[_0xb652[10]](404)[_0xb652[12]]();return null};return _0x9e2dxa}}function saveUpdates(_0x9e2dxd){return function(_0x9e2dxa){return _0x9e2dxa[_0xb652[14]](_0x9e2dxd)[_0xb652[13]](function(_0x9e2dxe){return _0x9e2dxe})}}function removeEntity(_0x9e2dx6){return function(_0x9e2dxa){if(_0x9e2dxa){return _0x9e2dxa[_0xb652[15]]()[_0xb652[13]](function(){_0x9e2dx6[_0xb652[10]](204)[_0xb652[12]]()})}}}exports[_0xb652[16]]= function(_0x9e2dx10,_0x9e2dx6){SugarcrmConfiguration[_0xb652[19]]({where:_0x9e2dx10[_0xb652[18]]})[_0xb652[13]](responseWithResult(_0x9e2dx6))[_0xb652[17]](handleError(_0x9e2dx6))};exports[_0xb652[20]]= function(_0x9e2dx10,_0x9e2dx6){SugarcrmConfiguration[_0xb652[26]]({where:{id:_0x9e2dx10[_0xb652[22]][_0xb652[21]]},include:[{model:SugarcrmField,as:_0xb652[23]},{model:SugarcrmField,as:_0xb652[24]},{model:SugarcrmField,as:_0xb652[25]}]})[_0xb652[13]](handleEntityNotFound(_0x9e2dx6))[_0xb652[13]](responseWithResult(_0x9e2dx6))[_0xb652[17]](handleError(_0x9e2dx6))};exports[_0xb652[27]]= function(_0x9e2dx10,_0x9e2dx6){SugarcrmConfiguration[_0xb652[27]](_0x9e2dx10[_0xb652[28]])[_0xb652[13]](responseWithResult(_0x9e2dx6,201))[_0xb652[17]](handleError(_0x9e2dx6))};exports[_0xb652[29]]= function(_0x9e2dx10,_0x9e2dx6){if(_0x9e2dx10[_0xb652[28]][_0xb652[21]]){delete _0x9e2dx10[_0xb652[28]][_0xb652[21]]};SugarcrmConfiguration[_0xb652[30]](_0x9e2dx10[_0xb652[22]][_0xb652[21]])[_0xb652[13]](handleEntityNotFound(_0x9e2dx6))[_0xb652[13]](saveUpdates(_0x9e2dx10[_0xb652[28]]))[_0xb652[13]](responseWithResult(_0x9e2dx6))[_0xb652[17]](handleError(_0x9e2dx6))};exports[_0xb652[15]]= function(_0x9e2dx10,_0x9e2dx6){SugarcrmConfiguration[_0xb652[30]](_0x9e2dx10[_0xb652[22]][_0xb652[21]])[_0xb652[13]](handleEntityNotFound(_0x9e2dx6))[_0xb652[13]](removeEntity(_0x9e2dx6))[_0xb652[17]](handleError(_0x9e2dx6))};exports[_0xb652[31]]= function(_0x9e2dx10,_0x9e2dx6,_0x9e2dx11){var _0x9e2dx12;SugarcrmConfiguration[_0xb652[30]](_0x9e2dx10[_0xb652[22]][_0xb652[21]])[_0xb652[13]](handleEntityNotFound(_0x9e2dx6))[_0xb652[13]](function(_0x9e2dx15){_0x9e2dx12= _0x9e2dx15;return SugarcrmField[_0xb652[27]](_0x9e2dx10[_0xb652[28]])})[_0xb652[13]](function(_0x9e2dx14){switch(_0x9e2dx10[_0xb652[22]][_0xb652[39]]){case _0xb652[34]:return [_0x9e2dx12[_0xb652[33]](_0x9e2dx14),_0x9e2dx14];case _0xb652[36]:return [_0x9e2dx12[_0xb652[35]](_0x9e2dx14),_0x9e2dx14];case _0xb652[38]:return [_0x9e2dx12[_0xb652[37]](_0x9e2dx14),_0x9e2dx14]}})[_0xb652[32]](function(_0x9e2dx13,_0x9e2dx14){return _0x9e2dx6[_0xb652[10]](201)[_0xb652[11]](_0x9e2dx14)})[_0xb652[17]](handleError(_0x9e2dx6))}
\ No newline at end of file
+var _0x2026=["\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"];_0x2026[0];var _=require(_0x2026[1]);var logger=require(_0x2026[3])(_0x2026[2]);var SugarcrmConfiguration=require(_0x2026[5])[_0x2026[4]];var SugarcrmField=require(_0x2026[5])[_0x2026[6]];function handleError(_0xe1cex6,_0xe1cex7){_0xe1cex7= _0xe1cex7|| 500;return function(_0xe1cex8){logger[_0x2026[8]](_0xe1cex8[_0x2026[7]]);_0xe1cex6[_0x2026[10]](_0xe1cex7)[_0x2026[9]](_0xe1cex8)}}function responseWithResult(_0xe1cex6,_0xe1cex7){_0xe1cex7= _0xe1cex7|| 200;return function(_0xe1cexa){if(_0xe1cexa){_0xe1cex6[_0x2026[10]](_0xe1cex7)[_0x2026[11]](_0xe1cexa)}}}function handleEntityNotFound(_0xe1cex6){return function(_0xe1cexa){if(!_0xe1cexa){_0xe1cex6[_0x2026[10]](404)[_0x2026[12]]();return null};return _0xe1cexa}}function saveUpdates(_0xe1cexd){return function(_0xe1cexa){return _0xe1cexa[_0x2026[14]](_0xe1cexd)[_0x2026[13]](function(_0xe1cexe){return _0xe1cexe})}}function removeEntity(_0xe1cex6){return function(_0xe1cexa){if(_0xe1cexa){return _0xe1cexa[_0x2026[15]]()[_0x2026[13]](function(){_0xe1cex6[_0x2026[10]](204)[_0x2026[12]]()})}}}exports[_0x2026[16]]= function(_0xe1cex10,_0xe1cex6){SugarcrmConfiguration[_0x2026[19]]({where:_0xe1cex10[_0x2026[18]]})[_0x2026[13]](responseWithResult(_0xe1cex6))[_0x2026[17]](handleError(_0xe1cex6))};exports[_0x2026[20]]= function(_0xe1cex10,_0xe1cex6){SugarcrmConfiguration[_0x2026[26]]({where:{id:_0xe1cex10[_0x2026[22]][_0x2026[21]]},include:[{model:SugarcrmField,as:_0x2026[23]},{model:SugarcrmField,as:_0x2026[24]},{model:SugarcrmField,as:_0x2026[25]}]})[_0x2026[13]](handleEntityNotFound(_0xe1cex6))[_0x2026[13]](responseWithResult(_0xe1cex6))[_0x2026[17]](handleError(_0xe1cex6))};exports[_0x2026[27]]= function(_0xe1cex10,_0xe1cex6){SugarcrmConfiguration[_0x2026[27]](_0xe1cex10[_0x2026[28]])[_0x2026[13]](responseWithResult(_0xe1cex6,201))[_0x2026[17]](handleError(_0xe1cex6))};exports[_0x2026[29]]= function(_0xe1cex10,_0xe1cex6){if(_0xe1cex10[_0x2026[28]][_0x2026[21]]){delete _0xe1cex10[_0x2026[28]][_0x2026[21]]};SugarcrmConfiguration[_0x2026[30]](_0xe1cex10[_0x2026[22]][_0x2026[21]])[_0x2026[13]](handleEntityNotFound(_0xe1cex6))[_0x2026[13]](saveUpdates(_0xe1cex10[_0x2026[28]]))[_0x2026[13]](responseWithResult(_0xe1cex6))[_0x2026[17]](handleError(_0xe1cex6))};exports[_0x2026[15]]= function(_0xe1cex10,_0xe1cex6){SugarcrmConfiguration[_0x2026[30]](_0xe1cex10[_0x2026[22]][_0x2026[21]])[_0x2026[13]](handleEntityNotFound(_0xe1cex6))[_0x2026[13]](removeEntity(_0xe1cex6))[_0x2026[17]](handleError(_0xe1cex6))};exports[_0x2026[31]]= function(_0xe1cex10,_0xe1cex6,_0xe1cex11){var _0xe1cex12;SugarcrmConfiguration[_0x2026[30]](_0xe1cex10[_0x2026[22]][_0x2026[21]])[_0x2026[13]](handleEntityNotFound(_0xe1cex6))[_0x2026[13]](function(_0xe1cex15){_0xe1cex12= _0xe1cex15;return SugarcrmField[_0x2026[27]](_0xe1cex10[_0x2026[28]])})[_0x2026[13]](function(_0xe1cex14){switch(_0xe1cex10[_0x2026[22]][_0x2026[39]]){case _0x2026[34]:return [_0xe1cex12[_0x2026[33]](_0xe1cex14),_0xe1cex14];case _0x2026[36]:return [_0xe1cex12[_0x2026[35]](_0xe1cex14),_0xe1cex14];case _0x2026[38]:return [_0xe1cex12[_0x2026[37]](_0xe1cex14),_0xe1cex14]}})[_0x2026[32]](function(_0xe1cex13,_0xe1cex14){return _0xe1cex6[_0x2026[10]](201)[_0x2026[11]](_0xe1cex14)})[_0x2026[17]](handleError(_0xe1cex6))}
\ No newline at end of file