Built motion from commit 95c3d5ad5.|1.0.29
[motion.git] / server / api / report_openchannel / report_openchannel.controller.js
1 var _0xb07c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x52\x65\x70\x6F\x72\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\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","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x61\x63\x63\x65\x70\x74","\x2E","\x73\x70\x6C\x69\x74","\x75\x6E\x69\x71\x75\x65\x69\x64","\x70\x61\x72\x61\x6D\x73","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x4F\x50\x45\x4E","\x61\x67\x65\x6E\x74","\x75\x73\x65\x72","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x69\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x43\x4C\x4F\x53\x45\x44","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D\x73","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x43\x61\x70\x61\x63\x69\x74\x79","\x72\x65\x6A\x65\x63\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74"];_0xb07c[0];var _=require(_0xb07c[1]);var ReportOpenchannel=require(_0xb07c[3])[_0xb07c[2]];var OpenchannelRoom=require(_0xb07c[3])[_0xb07c[4]];var sequelize=require(_0xb07c[3])[_0xb07c[5]];var Agent=require(_0xb07c[3])[_0xb07c[6]];var Util=require(_0xb07c[7]);var moment=require(_0xb07c[8]);var logger=require(_0xb07c[10])(_0xb07c[9]);function handleError(_0xf572xa,_0xf572xb){logger[_0xb07c[12]](_0xf572xb[_0xb07c[11]]);return _0xf572xa[_0xb07c[14]](500)[_0xb07c[13]](_0xf572xb)}exports[_0xb07c[15]]= function(_0xf572xc,_0xf572xa){return ReportOpenchannel[_0xb07c[20]](Util[_0xb07c[19]](_0xf572xc[_0xb07c[18]]))[_0xb07c[17]](function(_0xf572xd){_0xf572xa[_0xb07c[14]](200)[_0xb07c[13]](_0xf572xd)})[_0xb07c[16]](function(_0xf572xb){return handleError(_0xf572xa,_0xf572xb)})};exports[_0xb07c[21]]= function(_0xf572xc,_0xf572xa){var _0xf572xe;var _0xf572xf=_0xf572xc[_0xb07c[25]][_0xb07c[24]][_0xb07c[23]](_0xb07c[22])[1];return Agent[_0xb07c[34]](_0xf572xc[_0xb07c[29]][_0xb07c[33]],{attributes:[_0xb07c[33],_0xb07c[37]]})[_0xb07c[17]](function(_0xf572x13){_0xf572xe= _0xf572x13;return _0xf572x13[_0xb07c[36]]({where:{status:{$ne:_0xb07c[35]},id:{$ne:_0xf572xf}},attributes:[_0xb07c[33]]})})[_0xb07c[17]](function(_0xf572x12){return ReportOpenchannel[_0xb07c[34]](_0xf572xc[_0xb07c[25]][_0xb07c[33]])})[_0xb07c[17]](function(_0xf572x10){if(!_0xf572x10){return _0xf572xa[_0xb07c[26]](404)};var _0xf572x11=_[_0xb07c[31]](_0xf572x10,{connectid:_0xf572xc[_0xb07c[25]][_0xb07c[24]]});return _0xf572x11[_0xb07c[32]]()})[_0xb07c[17]](function(){return OpenchannelRoom[_0xb07c[30]]({status:_0xb07c[27],openReason:_0xb07c[28]},{where:{id:_0xf572xf},user:_0xf572xc[_0xb07c[29]],individualHooks:true})})[_0xb07c[17]](function(){return _0xf572xa[_0xb07c[26]](200)})[_0xb07c[16]](sequelize.UniqueConstraintError,function(_0xf572xb){return _0xf572xa[_0xb07c[26]](504)})[_0xb07c[16]](function(_0xf572xb){return handleError(_0xf572xa,_0xf572xb)})};exports[_0xb07c[38]]= function(_0xf572xc,_0xf572xa){return ReportOpenchannel[_0xb07c[34]](_0xf572xc[_0xb07c[25]][_0xb07c[33]])[_0xb07c[17]](function(_0xf572x10){if(!_0xf572x10){return _0xf572xa[_0xb07c[26]](404)};var _0xf572x11=_[_0xb07c[31]](_0xf572x10,{rejectedAt:moment()[_0xb07c[40]](_0xb07c[39])});return _0xf572x11[_0xb07c[32]]()})[_0xb07c[17]](function(){return _0xf572xa[_0xb07c[26]](200)})[_0xb07c[16]](function(_0xf572xb){return handleError(_0xf572xa,_0xf572xb)})}