Built motion from commit b8fca89.|0.0.57
[motion.git] / server / api / report_jscripty_session / report_jscripty_session.controller.js
1 var _0x5a17=["\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\x53\x65\x73\x73\x69\x6F\x6E","\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","\x6C\x6F\x67","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x66\x69\x6E\x64\x42\x79\x49\x64"];_0x5a17[0];var _=require(_0x5a17[1]);var ReportJscriptySession=require(_0x5a17[3])[_0x5a17[2]];function handleError(_0xf602x4,_0xf602x5){_0xf602x5=_0xf602x5||500;return function(_0xf602x6){_0xf602x4[_0x5a17[5]](_0xf602x5)[_0x5a17[4]](_0xf602x6)}}function responseWithResult(_0xf602x4,_0xf602x5){_0xf602x5=_0xf602x5||200;return function(_0xf602x8){if(_0xf602x8){_0xf602x4[_0x5a17[5]](_0xf602x5)[_0x5a17[6]](_0xf602x8)}}}function handleEntityNotFound(_0xf602x4){return function(_0xf602x8){if(!_0xf602x8){_0xf602x4[_0x5a17[5]](404)[_0x5a17[7]]();return null};return _0xf602x8}}function saveUpdates(_0xf602xb){return function(_0xf602x8){return _0xf602x8[_0x5a17[9]](_0xf602xb)[_0x5a17[8]](function(_0xf602xc){return _0xf602xc})}}function removeEntity(_0xf602x4){return function(_0xf602x8){if(_0xf602x8){return _0xf602x8[_0x5a17[10]]()[_0x5a17[8]](function(){_0xf602x4[_0x5a17[5]](204)[_0x5a17[7]]()})}}}exports[_0x5a17[11]]=function(_0xf602xe,_0xf602x4){ReportJscriptySession[_0x5a17[13]]()[_0x5a17[8]](responseWithResult(_0xf602x4))[_0x5a17[12]](handleError(_0xf602x4))};exports[_0x5a17[14]]=function(_0xf602xe,_0xf602x4){ReportJscriptySession[_0x5a17[13]]({where:{projectId:_0xf602xe[_0x5a17[18]][_0x5a17[17]]}})[_0x5a17[8]](function(_0xf602xf){if(!_0xf602xf){return _0xf602x4[_0x5a17[16]](404)};return _0xf602x4[_0x5a17[5]](200)[_0x5a17[4]](_0xf602xf)})[_0x5a17[8]](handleEntityNotFound(_0xf602x4))[_0x5a17[8]](responseWithResult(_0xf602x4))[_0x5a17[12]](function(_0xf602x6){console[_0x5a17[15]](_0xf602x6);return handleError(_0xf602x4,_0xf602x6)})};exports[_0x5a17[19]]=function(_0xf602xe,_0xf602x4){ReportJscriptySession[_0x5a17[19]](_0xf602xe[_0x5a17[20]])[_0x5a17[8]](function(_0xf602x10){return _0xf602x4[_0x5a17[5]](201)[_0x5a17[4]](_0xf602x10)})[_0x5a17[12]](function(_0xf602x6){return handleError(_0xf602x4,_0xf602x6)})};exports[_0x5a17[21]]=function(_0xf602xe,_0xf602x4){ReportJscriptySession[_0x5a17[21]](_0xf602xe[_0x5a17[20]],{where:{session_id:_0xf602xe[_0x5a17[18]][_0x5a17[17]]}})[_0x5a17[8]](function(_0xf602x10){return _0xf602x4[_0x5a17[5]](200)[_0x5a17[4]](_0xf602x10)})[_0x5a17[12]](function(_0xf602x6){return handleError(_0xf602x4,_0xf602x6)})};exports[_0x5a17[10]]=function(_0xf602xe,_0xf602x4){ReportJscriptySession[_0x5a17[22]](_0xf602xe[_0x5a17[18]][_0x5a17[17]])[_0x5a17[8]](handleEntityNotFound(_0xf602x4))[_0x5a17[8]](removeEntity(_0xf602x4))[_0x5a17[12]](handleError(_0xf602x4))}