Built motion from commit 22bc4a4.|0.0.19
[motion.git] / server / api / event / event.socket.js
1 var _0x3782=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x45\x76\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x74\x68\x65\x6E","\x69\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x65\x76\x65\x6E\x74\x3A","\x63\x68\x61\x6E\x6E\x65\x6C","\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x65\x76\x65\x6E\x74\x3A\x72\x65\x6D\x6F\x76\x65"];_0x3782[0];var Event=require(_0x3782[2])[_0x3782[1]];exports[_0x3782[3]]=function(_0xc326x2){Event[_0x3782[7]](function(_0xc326x3){Event[_0x3782[6]]({where:{id:_0xc326x3[_0x3782[5]]},include:[{all:true}]})[_0x3782[4]](function(_0xc326x4){onSave(_0xc326x2,_0xc326x4)})});Event[_0x3782[8]](function(_0xc326x3){onRemove(_0xc326x2,_0xc326x3)});};function onSave(_0xc326x2,_0xc326x3,_0xc326x6){_0xc326x2[_0x3782[13]]((_0x3782[10]+_0xc326x3[_0x3782[11]]+_0x3782[12])[_0x3782[9]](),_0xc326x3)}function onRemove(_0xc326x2,_0xc326x3,_0xc326x6){_0xc326x2[_0x3782[13]](_0x3782[14],_0xc326x3)}