Built motion from commit 5fc88b3.|0.0.60
[motion.git] / server / api / report_jscripty_input / report_jscripty_input.controller.js
1 var _0xfdeb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x52\x65\x70\x6F\x72\x74\x4A\x73\x63\x72\x69\x70\x74\x79\x49\x6E\x70\x75\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\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","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x75\x70\x64\x61\x74\x65"];_0xfdeb[0];var _=require(_0xfdeb[1]);var ReportJscriptyInput=require(_0xfdeb[3])[_0xfdeb[2]];function handleError(_0x5694x4,_0x5694x5){_0x5694x5=_0x5694x5||500;return function(_0x5694x6){_0x5694x4[_0xfdeb[5]](_0x5694x5)[_0xfdeb[4]](_0x5694x6)}}function responseWithResult(_0x5694x4,_0x5694x5){_0x5694x5=_0x5694x5||200;return function(_0x5694x8){if(_0x5694x8){_0x5694x4[_0xfdeb[5]](_0x5694x5)[_0xfdeb[6]](_0x5694x8)}}}function handleEntityNotFound(_0x5694x4){return function(_0x5694x8){if(!_0x5694x8){_0x5694x4[_0xfdeb[5]](404)[_0xfdeb[7]]();return null};return _0x5694x8}}function saveUpdates(_0x5694xb){return function(_0x5694x8){return _0x5694x8[_0xfdeb[9]](_0x5694xb)[_0xfdeb[8]](function(_0x5694xc){return _0x5694xc})}}function removeEntity(_0x5694x4){return function(_0x5694x8){if(_0x5694x8){return _0x5694x8[_0xfdeb[10]]()[_0xfdeb[8]](function(){_0x5694x4[_0xfdeb[5]](204)[_0xfdeb[7]]()})}}}exports[_0xfdeb[11]]=function(_0x5694xe,_0x5694x4){ReportJscriptyInput[_0xfdeb[13]]()[_0xfdeb[8]](responseWithResult(_0x5694x4))[_0xfdeb[12]](handleError(_0x5694x4))};exports[_0xfdeb[14]]=function(_0x5694xe,_0x5694x4){ReportJscriptyInput[_0xfdeb[17]](_0x5694xe[_0xfdeb[16]][_0xfdeb[15]])[_0xfdeb[8]](handleEntityNotFound(_0x5694x4))[_0xfdeb[8]](responseWithResult(_0x5694x4))[_0xfdeb[12]](handleError(_0x5694x4))};exports[_0xfdeb[18]]=function(_0x5694xe,_0x5694x4){ReportJscriptyInput[_0xfdeb[10]]({where:{sessionId:_0x5694xe[_0xfdeb[16]][_0xfdeb[15]]}})[_0xfdeb[8]](function(){return ReportJscriptyInput[_0xfdeb[20]](_0x5694xe[_0xfdeb[19]])})[_0xfdeb[8]](function(_0x5694xf){return _0x5694x4[_0xfdeb[5]](201)[_0xfdeb[4]](_0x5694xe[_0xfdeb[19]])})[_0xfdeb[12]](function(_0x5694x6){return handleError(_0x5694x4,_0x5694x6)})};exports[_0xfdeb[21]]=function(_0x5694xe,_0x5694x4){if(_0x5694xe[_0xfdeb[19]][_0xfdeb[15]]){delete _0x5694xe[_0xfdeb[19]][_0xfdeb[15]]};ReportJscriptyInput[_0xfdeb[17]](_0x5694xe[_0xfdeb[16]][_0xfdeb[15]])[_0xfdeb[8]](handleEntityNotFound(_0x5694x4))[_0xfdeb[8]](saveUpdates(_0x5694xe[_0xfdeb[19]]))[_0xfdeb[8]](responseWithResult(_0x5694x4))[_0xfdeb[12]](handleError(_0x5694x4))};exports[_0xfdeb[10]]=function(_0x5694xe,_0x5694x4){ReportJscriptyInput[_0xfdeb[17]](_0x5694xe[_0xfdeb[16]][_0xfdeb[15]])[_0xfdeb[8]](handleEntityNotFound(_0x5694x4))[_0xfdeb[8]](removeEntity(_0x5694x4))[_0xfdeb[12]](handleError(_0x5694x4))}