Built motion from commit 832e619.|0.0.137
[motion.git] / server / api / freshdesk_configuration / freshdesk_configuration.controller.js
index 4940cb8..64f491b 100644 (file)
@@ -1 +1 @@
-var _0xfc71=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\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","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\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"];_0xfc71[0];var _=require(_0xfc71[1]);var FreshdeskConfiguration=require(_0xfc71[3])[_0xfc71[2]];var FreshdeskField=require(_0xfc71[3])[_0xfc71[4]];function handleError(_0x45b4x5,_0x45b4x6){_0x45b4x6= _0x45b4x6|| 500;return function(_0x45b4x7){_0x45b4x5[_0xfc71[6]](_0x45b4x6)[_0xfc71[5]](_0x45b4x7)}}function responseWithResult(_0x45b4x5,_0x45b4x6){_0x45b4x6= _0x45b4x6|| 200;return function(_0x45b4x9){if(_0x45b4x9){_0x45b4x5[_0xfc71[6]](_0x45b4x6)[_0xfc71[7]](_0x45b4x9)}}}function handleEntityNotFound(_0x45b4x5){return function(_0x45b4x9){if(!_0x45b4x9){_0x45b4x5[_0xfc71[6]](404)[_0xfc71[8]]();return null};return _0x45b4x9}}function saveUpdates(_0x45b4xc){return function(_0x45b4x9){return _0x45b4x9[_0xfc71[10]](_0x45b4xc)[_0xfc71[9]](function(_0x45b4xd){return _0x45b4xd})}}function removeEntity(_0x45b4x5){return function(_0x45b4x9){if(_0x45b4x9){return _0x45b4x9[_0xfc71[11]]()[_0xfc71[9]](function(){_0x45b4x5[_0xfc71[6]](204)[_0xfc71[8]]()})}}}exports[_0xfc71[12]]= function(_0x45b4xf,_0x45b4x5){FreshdeskConfiguration[_0xfc71[15]]({where:_0x45b4xf[_0xfc71[14]]})[_0xfc71[9]](responseWithResult(_0x45b4x5))[_0xfc71[13]](handleError(_0x45b4x5))};exports[_0xfc71[16]]= function(_0x45b4xf,_0x45b4x5){FreshdeskConfiguration[_0xfc71[22]]({where:{id:_0x45b4xf[_0xfc71[18]][_0xfc71[17]]},include:[{model:FreshdeskField,as:_0xfc71[19]},{model:FreshdeskField,as:_0xfc71[20]},{model:FreshdeskField,as:_0xfc71[21]}]})[_0xfc71[9]](handleEntityNotFound(_0x45b4x5))[_0xfc71[9]](responseWithResult(_0x45b4x5))[_0xfc71[13]](handleError(_0x45b4x5))};exports[_0xfc71[23]]= function(_0x45b4xf,_0x45b4x5){FreshdeskConfiguration[_0xfc71[23]](_0x45b4xf[_0xfc71[24]])[_0xfc71[9]](responseWithResult(_0x45b4x5,201))[_0xfc71[13]](handleError(_0x45b4x5))};exports[_0xfc71[25]]= function(_0x45b4xf,_0x45b4x5){if(_0x45b4xf[_0xfc71[24]][_0xfc71[17]]){delete _0x45b4xf[_0xfc71[24]][_0xfc71[17]]};FreshdeskConfiguration[_0xfc71[26]](_0x45b4xf[_0xfc71[18]][_0xfc71[17]])[_0xfc71[9]](handleEntityNotFound(_0x45b4x5))[_0xfc71[9]](saveUpdates(_0x45b4xf[_0xfc71[24]]))[_0xfc71[9]](responseWithResult(_0x45b4x5))[_0xfc71[13]](handleError(_0x45b4x5))};exports[_0xfc71[11]]= function(_0x45b4xf,_0x45b4x5){FreshdeskConfiguration[_0xfc71[26]](_0x45b4xf[_0xfc71[18]][_0xfc71[17]])[_0xfc71[9]](handleEntityNotFound(_0x45b4x5))[_0xfc71[9]](removeEntity(_0x45b4x5))[_0xfc71[13]](handleError(_0x45b4x5))};exports[_0xfc71[27]]= function(_0x45b4xf,_0x45b4x5,_0x45b4x10){var _0x45b4x11;FreshdeskConfiguration[_0xfc71[26]](_0x45b4xf[_0xfc71[18]][_0xfc71[17]])[_0xfc71[9]](handleEntityNotFound(_0x45b4x5))[_0xfc71[9]](function(_0x45b4x14){_0x45b4x11= _0x45b4x14;return FreshdeskField[_0xfc71[23]](_0x45b4xf[_0xfc71[24]])})[_0xfc71[9]](function(_0x45b4x13){switch(_0x45b4xf[_0xfc71[18]][_0xfc71[35]]){case _0xfc71[30]:return [_0x45b4x11[_0xfc71[29]](_0x45b4x13),_0x45b4x13];case _0xfc71[32]:return [_0x45b4x11[_0xfc71[31]](_0x45b4x13),_0x45b4x13];case _0xfc71[34]:return [_0x45b4x11[_0xfc71[33]](_0x45b4x13),_0x45b4x13]}})[_0xfc71[28]](function(_0x45b4x12,_0x45b4x13){return _0x45b4x5[_0xfc71[6]](201)[_0xfc71[7]](_0x45b4x13)})[_0xfc71[13]](handleError(_0x45b4x5))}
\ No newline at end of file
+var _0x3dcc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\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","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\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"];_0x3dcc[0];var _=require(_0x3dcc[1]);var FreshdeskConfiguration=require(_0x3dcc[3])[_0x3dcc[2]];var FreshdeskField=require(_0x3dcc[3])[_0x3dcc[4]];function handleError(_0x1e19x5,_0x1e19x6){_0x1e19x6= _0x1e19x6|| 500;return function(_0x1e19x7){_0x1e19x5[_0x3dcc[6]](_0x1e19x6)[_0x3dcc[5]](_0x1e19x7)}}function responseWithResult(_0x1e19x5,_0x1e19x6){_0x1e19x6= _0x1e19x6|| 200;return function(_0x1e19x9){if(_0x1e19x9){_0x1e19x5[_0x3dcc[6]](_0x1e19x6)[_0x3dcc[7]](_0x1e19x9)}}}function handleEntityNotFound(_0x1e19x5){return function(_0x1e19x9){if(!_0x1e19x9){_0x1e19x5[_0x3dcc[6]](404)[_0x3dcc[8]]();return null};return _0x1e19x9}}function saveUpdates(_0x1e19xc){return function(_0x1e19x9){return _0x1e19x9[_0x3dcc[10]](_0x1e19xc)[_0x3dcc[9]](function(_0x1e19xd){return _0x1e19xd})}}function removeEntity(_0x1e19x5){return function(_0x1e19x9){if(_0x1e19x9){return _0x1e19x9[_0x3dcc[11]]()[_0x3dcc[9]](function(){_0x1e19x5[_0x3dcc[6]](204)[_0x3dcc[8]]()})}}}exports[_0x3dcc[12]]= function(_0x1e19xf,_0x1e19x5){FreshdeskConfiguration[_0x3dcc[15]]({where:_0x1e19xf[_0x3dcc[14]]})[_0x3dcc[9]](responseWithResult(_0x1e19x5))[_0x3dcc[13]](handleError(_0x1e19x5))};exports[_0x3dcc[16]]= function(_0x1e19xf,_0x1e19x5){FreshdeskConfiguration[_0x3dcc[22]]({where:{id:_0x1e19xf[_0x3dcc[18]][_0x3dcc[17]]},include:[{model:FreshdeskField,as:_0x3dcc[19]},{model:FreshdeskField,as:_0x3dcc[20]},{model:FreshdeskField,as:_0x3dcc[21]}]})[_0x3dcc[9]](handleEntityNotFound(_0x1e19x5))[_0x3dcc[9]](responseWithResult(_0x1e19x5))[_0x3dcc[13]](handleError(_0x1e19x5))};exports[_0x3dcc[23]]= function(_0x1e19xf,_0x1e19x5){FreshdeskConfiguration[_0x3dcc[23]](_0x1e19xf[_0x3dcc[24]])[_0x3dcc[9]](responseWithResult(_0x1e19x5,201))[_0x3dcc[13]](handleError(_0x1e19x5))};exports[_0x3dcc[25]]= function(_0x1e19xf,_0x1e19x5){if(_0x1e19xf[_0x3dcc[24]][_0x3dcc[17]]){delete _0x1e19xf[_0x3dcc[24]][_0x3dcc[17]]};FreshdeskConfiguration[_0x3dcc[26]](_0x1e19xf[_0x3dcc[18]][_0x3dcc[17]])[_0x3dcc[9]](handleEntityNotFound(_0x1e19x5))[_0x3dcc[9]](saveUpdates(_0x1e19xf[_0x3dcc[24]]))[_0x3dcc[9]](responseWithResult(_0x1e19x5))[_0x3dcc[13]](handleError(_0x1e19x5))};exports[_0x3dcc[11]]= function(_0x1e19xf,_0x1e19x5){FreshdeskConfiguration[_0x3dcc[26]](_0x1e19xf[_0x3dcc[18]][_0x3dcc[17]])[_0x3dcc[9]](handleEntityNotFound(_0x1e19x5))[_0x3dcc[9]](removeEntity(_0x1e19x5))[_0x3dcc[13]](handleError(_0x1e19x5))};exports[_0x3dcc[27]]= function(_0x1e19xf,_0x1e19x5,_0x1e19x10){var _0x1e19x11;FreshdeskConfiguration[_0x3dcc[26]](_0x1e19xf[_0x3dcc[18]][_0x3dcc[17]])[_0x3dcc[9]](handleEntityNotFound(_0x1e19x5))[_0x3dcc[9]](function(_0x1e19x14){_0x1e19x11= _0x1e19x14;return FreshdeskField[_0x3dcc[23]](_0x1e19xf[_0x3dcc[24]])})[_0x3dcc[9]](function(_0x1e19x13){switch(_0x1e19xf[_0x3dcc[18]][_0x3dcc[35]]){case _0x3dcc[30]:return [_0x1e19x11[_0x3dcc[29]](_0x1e19x13),_0x1e19x13];case _0x3dcc[32]:return [_0x1e19x11[_0x3dcc[31]](_0x1e19x13),_0x1e19x13];case _0x3dcc[34]:return [_0x1e19x11[_0x3dcc[33]](_0x1e19x13),_0x1e19x13]}})[_0x3dcc[28]](function(_0x1e19x12,_0x1e19x13){return _0x1e19x5[_0x3dcc[6]](201)[_0x3dcc[7]](_0x1e19x13)})[_0x3dcc[13]](handleError(_0x1e19x5))}
\ No newline at end of file