Built motion from commit 48095ee.|0.0.102
[motion.git] / server / api / voice_context / voice_context.controller.js
index 9669887..8563774 100644 (file)
@@ -1 +1 @@
-var _0x271d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x69\x6E\x64\x65\x78","\x6E\x61\x6D\x65","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x70\x65\x72\x5F\x70\x61\x67\x65","\x71\x75\x65\x72\x79","\x70\x61\x67\x65","\x6F\x72\x64\x65\x72","\x25\x73\x20\x25\x73","\x73\x6F\x72\x74\x5F\x62\x79","\x73\x6F\x72\x74\x5F\x6F\x72\x64\x65\x72","\x41\x53\x43","\x66\x6F\x72\x6D\x61\x74","\x24\x6F\x72","\x77\x68\x65\x72\x65","\x25","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x24","\x24\x6C\x69\x6B\x65","\x66\x6F\x72\x49\x6E","\x53\x6F\x6D\x65\x74\x68\x69\x6E\x67\x20\x62\x6C\x65\x77\x20\x75\x70\x21","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x63\x61\x74\x63\x68","\x63\x6F\x75\x6E\x74","\x63\x65\x69\x6C","\x6F\x66\x66\x73\x65\x74","\x25\x73\x3A\x2F\x2F\x25\x73\x25\x73\x3F\x70\x61\x67\x65\x3D\x25\x64","\x70\x72\x6F\x74\x6F\x63\x6F\x6C","\x68\x6F\x73\x74","\x68\x65\x61\x64\x65\x72\x73","\x62\x61\x73\x65\x55\x72\x6C","\x72\x6F\x77\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x6F\x6E\x74\x65\x78\x74\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x62\x6F\x64\x79","\x6C\x6F\x67","\x66\x69\x6E\x64\x41\x6C\x6C","\x63\x72\x65\x61\x74\x65","\x46\x69\x6E\x64\x69\x6E\x67\x20\x61\x70\x70\x20\x72\x6F\x77\x2E\x2E\x2E\x2E\x2E","\x6C\x65\x6E\x67\x74\x68","\x4D\x45\x53\x53\x41\x47\x45\x5F\x45\x58\x49\x53\x54\x5F\x52\x4F\x55\x54\x45","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x4D\x45\x53\x53\x41\x47\x45\x5F\x43\x4F\x4E\x54\x45\x58\x54\x5F\x52\x4F\x55\x54\x45\x5F\x41\x53\x53\x4F\x43\x49\x41\x54\x45\x44","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x70\x6C\x75\x63\x6B"];_0x271d[0];var _=require(_0x271d[1]);var util=require(_0x271d[2]);var sequelize=require(_0x271d[4])[_0x271d[3]];var VoiceContext=require(_0x271d[4])[_0x271d[5]];var VoiceExtension=require(_0x271d[4])[_0x271d[6]];exports[_0x271d[7]]=function(_0x94fax6,_0x94fax7,_0x94fax8){var _0x94fax9=[_0x271d[8],_0x271d[9]];var _0x94faxa=_0x94fax6[_0x271d[11]][_0x271d[10]]?parseInt(_0x94fax6[_0x271d[11]][_0x271d[10]],10):100;var _0x94faxb=_0x94fax6[_0x271d[11]][_0x271d[12]]?parseInt(_0x94fax6[_0x271d[11]][_0x271d[12]],10):0;var _0x94faxc={where:{},limit:_0x94faxa,offset:_0x94faxb*_0x94faxa};_[_0x271d[26]](_0x94fax6[_0x271d[11]],function(_0x94faxd,_0x94faxe){switch(_0x94faxe){case _0x271d[10]:;case _0x271d[12]:break ;;case _0x271d[15]:_0x94faxc[_0x271d[13]]=util[_0x271d[18]](_0x271d[14],_0x94fax6[_0x271d[11]][_0x271d[15]],_0x94fax6[_0x271d[11]][_0x271d[16]]||_0x271d[17])||null;break ;;case _0x271d[16]:break ;;case _0x271d[24]:_0x94faxc[_0x271d[20]][_0x271d[19]]=[];_0x94fax9[_0x271d[23]](function(_0x94faxf){var _0x94fax10={};_0x94fax10[_0x94faxf]={$like:_0x271d[21]+_0x94faxd+_0x271d[21]};_0x94faxc[_0x271d[20]][_0x271d[19]][_0x271d[22]](_0x94fax10);});break ;;default:_0x94faxc[_0x271d[20]][_0x94faxe]={$like:{}};_0x94faxc[_0x271d[20]][_0x94faxe][_0x271d[25]]=_0x271d[21]+_0x94faxd+_0x271d[21];;}});VoiceContext[_0x271d[41]](_0x94faxc)[_0x271d[40]](function(_0x94fax12){var _0x94fax13=Math[_0x271d[32]](_0x94fax12[_0x271d[31]]/_0x94faxa);var _0x94fax14=_0x94fax13>(_0x94faxc[_0x271d[33]]+1)?util[_0x271d[18]](_0x271d[34],_0x94fax6[_0x271d[35]],_0x94fax6[_0x271d[37]][_0x271d[36]],_0x94fax6[_0x271d[38]],_0x94faxb+1):null;var _0x94fax15=_0x94faxb>0?util[_0x271d[18]](_0x271d[34],_0x94fax6[_0x271d[35]],_0x94fax6[_0x271d[37]][_0x271d[36]],_0x94fax6[_0x271d[38]],_0x94faxb-1):null;_0x94fax7[_0x271d[29]](200)[_0x271d[28]]({count:_0x94fax12[_0x271d[31]],rows:_0x94fax12[_0x271d[39]],next_page:_0x94fax14,previous_page:_0x94fax15,total_pages:_0x94fax13});})[_0x271d[30]](function(_0x94fax11){_0x94fax7[_0x271d[29]](500)[_0x271d[28]]({error:_0x271d[27]})});};exports[_0x271d[42]]=function(_0x94fax6,_0x94fax7){VoiceContext[_0x271d[46]](_0x94fax6[_0x271d[45]][_0x271d[44]])[_0x271d[40]](function(_0x94fax16){if(!_0x94fax16){return _0x94fax7[_0x271d[43]](404)};return _0x94fax7[_0x271d[28]](_0x94fax16);})[_0x271d[30]](function(_0x94fax11){return handleError(_0x94fax7,_0x94fax11)})};exports[_0x271d[47]]=function(_0x94fax6,_0x94fax7){console[_0x271d[49]](_0x94fax6[_0x271d[48]]);VoiceContext[_0x271d[50]]({where:{name:_0x94fax6[_0x271d[48]][_0x271d[8]]}})[_0x271d[40]](function(_0x94fax17){if(!_0x94fax17){return _0x94fax7[_0x271d[43]](404)};return _0x94fax7[_0x271d[28]](_0x94fax17);})[_0x271d[30]](function(_0x94fax11){return handleError(_0x94fax7,_0x94fax11)});};exports[_0x271d[51]]=function(_0x94fax6,_0x94fax7){VoiceContext[_0x271d[50]]({where:{name:_0x94fax6[_0x271d[48]][_0x271d[8]]}})[_0x271d[40]](function(_0x94fax18){console[_0x271d[49]](_0x94fax18);console[_0x271d[49]](_0x271d[52]);if(!_0x94fax18){return _0x94fax7[_0x271d[43]](404)};if(_0x94fax18[_0x271d[53]]>0){return _0x94fax7[_0x271d[29]](500)[_0x271d[28]]({message:_0x271d[54]})};VoiceContext[_0x271d[51]](_0x94fax6[_0x271d[48]])[_0x271d[40]](function(_0x94fax16){return _0x94fax7[_0x271d[29]](201)[_0x271d[28]](_0x94fax16)})[_0x271d[30]](function(_0x94fax11){return handleError(_0x94fax7,_0x94fax11)});})[_0x271d[30]](function(_0x94fax11){return handleError(_0x94fax7,_0x94fax11)})};exports[_0x271d[55]]=function(_0x94fax6,_0x94fax7){VoiceContext[_0x271d[50]]({where:{name:_0x94fax6[_0x271d[48]][_0x271d[8]],id:{$ne:_0x94fax6[_0x271d[48]][_0x271d[44]]}}})[_0x271d[40]](function(_0x94fax18){console[_0x271d[49]](_0x94fax18);console[_0x271d[49]](_0x271d[52]);if(!_0x94fax18){return _0x94fax7[_0x271d[43]](404)};if(_0x94fax18[_0x271d[53]]>0){return _0x94fax7[_0x271d[29]](500)[_0x271d[28]]({message:_0x271d[54]})};if(_0x94fax6[_0x271d[48]][_0x271d[44]]){delete _0x94fax6[_0x271d[48]][_0x271d[44]]};VoiceContext[_0x271d[46]](_0x94fax6[_0x271d[45]][_0x271d[44]])[_0x271d[40]](function(_0x94fax16){if(!_0x94fax16){return _0x94fax7[_0x271d[43]](404)};var _0x94fax19=_[_0x271d[56]](_0x94fax16,_0x94fax6[_0x271d[48]]);_0x94fax19[_0x271d[57]]()[_0x271d[40]](function(){return _0x94fax7[_0x271d[29]](200)[_0x271d[28]](_0x94fax16)})[_0x271d[30]](function(_0x94fax11){return handleError(_0x94fax7,_0x94fax11)});})[_0x271d[30]](function(_0x94fax11){return handleError(_0x94fax7,_0x94fax11)});})[_0x271d[30]](function(_0x94fax11){return handleError(_0x94fax7,_0x94fax11)})};exports[_0x271d[58]]=function(_0x94fax6,_0x94fax7){VoiceContext[_0x271d[46]](_0x94fax6[_0x271d[45]][_0x271d[44]])[_0x271d[40]](function(_0x94fax16){if(!_0x94fax16){return _0x94fax7[_0x271d[43]](404)};VoiceExtension[_0x271d[50]]({where:{context:_0x94fax16[_0x271d[8]]}})[_0x271d[40]](function(_0x94fax1a){if(_0x94fax1a[_0x271d[53]]>0){return _0x94fax7[_0x271d[29]](500)[_0x271d[28]]({message:_0x271d[59]})};_0x94fax16[_0x271d[58]]()[_0x271d[40]](function(){return _0x94fax7[_0x271d[43]](204)})[_0x271d[30]](function(_0x94fax11){return handleError(_0x94fax7,_0x94fax11)});})[_0x271d[30]](function(_0x94fax11){return handleError(_0x94fax7,_0x94fax11)});})[_0x271d[30]](function(_0x94fax11){return handleError(_0x94fax7,_0x94fax11)})};exports[_0x271d[60]]=function(_0x94fax6,_0x94fax7){VoiceContext[_0x271d[50]]({where:{id:_0x94fax6[_0x271d[11]][_0x271d[44]]}})[_0x271d[40]](function(_0x94fax17){if(!_0x94fax17){return _0x94fax7[_0x271d[43]](404)};var _0x94fax1b=_[_0x271d[62]](_[_0x271d[62]](_0x94fax17,_0x271d[61]),_0x271d[8]);VoiceExtension[_0x271d[50]]({where:{context:_0x94fax1b}})[_0x271d[40]](function(_0x94fax1a){if(_0x94fax1a[_0x271d[53]]>0){return _0x94fax7[_0x271d[29]](500)[_0x271d[28]]({message:_0x271d[59]})};VoiceContext[_0x271d[58]]({where:{id:_0x94fax6[_0x271d[11]][_0x271d[44]]},individualHooks:true})[_0x271d[40]](function(){return _0x94fax7[_0x271d[43]](204)})[_0x271d[30]](function(_0x94fax11){return handleError(_0x94fax7,_0x94fax11)});})[_0x271d[30]](function(_0x94fax11){return handleError(_0x94fax7,_0x94fax11)});})[_0x271d[30]](function(_0x94fax11){return handleError(_0x94fax7,_0x94fax11)})};function handleError(_0x94fax7,_0x94fax11){return _0x94fax7[_0x271d[29]](500)[_0x271d[28]](_0x94fax11)}
\ No newline at end of file
+var _0x8109=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\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","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x6F\x6E\x74\x65\x78\x74\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x6E\x61\x6D\x65","\x62\x6F\x64\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x63\x72\x65\x61\x74\x65","\x6D\x65\x73\x73\x61\x67\x65","\x54\x68\x65\x20\x63\x6F\x6E\x74\x65\x78\x74\x20\x6E\x61\x6D\x65\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x65\x78\x69\x73\x74\x73","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x64\x4D\x65\x73\x73\x61\x67\x65","\x4D\x45\x53\x53\x41\x47\x45\x5F\x45\x58\x49\x53\x54\x5F\x43\x4F\x4E\x54\x45\x58\x54","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x6C\x65\x6E\x67\x74\x68","\x64\x65\x73\x74\x72\x6F\x79","\x65\x72\x72","\x6C\x6F\x67","\x54\x68\x65\x20\x63\x6F\x6E\x74\x65\x78\x74\x20\x69\x73\x20\x61\x73\x73\x6F\x63\x69\x61\x74\x65\x64\x20\x74\x6F\x20\x61\x20\x72\x6F\x75\x74\x65\x2C\x20\x64\x65\x6C\x65\x74\x65\x20\x6F\x72\x20\x63\x68\x61\x6E\x67\x65\x20\x69\x74\x20\x66\x69\x72\x73\x74","\x4D\x45\x53\x53\x41\x47\x45\x5F\x43\x4F\x4E\x54\x45\x58\x54\x5F\x52\x4F\x55\x54\x45\x5F\x41\x53\x53\x4F\x43\x49\x41\x54\x45\x44","\x64\x65\x66\x61\x75\x6C\x74\x45\x6E\x74\x72\x79","\x59\x6F\x75\x20\x63\x61\x6E\x27\x74\x20\x64\x65\x6C\x65\x74\x65\x20\x61\x20\x64\x65\x66\x61\x75\x6C\x74\x20\x65\x6E\x74\x72\x79\x21","\x4D\x45\x53\x53\x41\x47\x45\x5F\x44\x45\x46\x41\x55\x4C\x54\x5F\x45\x4E\x54\x52\x59","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x66\x69\x6E\x64","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x6D\x61\x70"];_0x8109[0];var _=require(_0x8109[1]);var util=require(_0x8109[2]);var Util=require(_0x8109[3]);var sequelize=require(_0x8109[5])[_0x8109[4]];var VoiceContext=require(_0x8109[5])[_0x8109[6]];var VoiceExtension=require(_0x8109[5])[_0x8109[7]];exports[_0x8109[8]]=function(_0xe03ax7,_0xe03ax8,_0xe03ax9){return VoiceContext[_0x8109[15]](Util[_0x8109[14]](_0xe03ax7[_0x8109[13]]))[_0x8109[12]](function(_0xe03axb){_0xe03ax8[_0x8109[11]](200)[_0x8109[10]](_0xe03axb)})[_0x8109[9]](function(_0xe03axa){return handleError(_0xe03ax8,_0xe03axa)})};exports[_0x8109[16]]=function(_0xe03ax7,_0xe03ax8){return VoiceContext[_0x8109[20]](_0xe03ax7[_0x8109[19]][_0x8109[18]])[_0x8109[12]](function(_0xe03axc){if(!_0xe03axc){return _0xe03ax8[_0x8109[17]](404)};return _0xe03ax8[_0x8109[10]](_0xe03axc)})[_0x8109[9]](function(_0xe03axa){return handleError(_0xe03ax8,_0xe03axa)})};exports[_0x8109[21]]=function(_0xe03ax7,_0xe03ax8){return VoiceContext[_0x8109[24]]({where:{name:_0xe03ax7[_0x8109[23]][_0x8109[22]]}})[_0x8109[12]](function(_0xe03axd){if(!_0xe03axd){return _0xe03ax8[_0x8109[17]](404)};return _0xe03ax8[_0x8109[10]](_0xe03axd)})[_0x8109[9]](function(_0xe03axa){return handleError(_0xe03ax8,_0xe03axa)})};exports[_0x8109[25]]=function(_0xe03ax7,_0xe03ax8){return VoiceContext[_0x8109[25]](_0xe03ax7[_0x8109[23]])[_0x8109[12]](function(_0xe03axc){return _0xe03ax8[_0x8109[11]](201)[_0x8109[10]](_0xe03axc)})[_0x8109[9]](sequelize.UniqueConstraintError,function(_0xe03axa){_0xe03axa[_0x8109[26]]=_0x8109[27];_0xe03axa[_0x8109[28]]=_0x8109[29];return handleError(_0xe03ax8,_0xe03axa)})[_0x8109[9]](function(_0xe03axa){return handleError(_0xe03ax8,_0xe03axa)})};exports[_0x8109[30]]=function(_0xe03ax7,_0xe03ax8){return VoiceContext[_0x8109[24]]({where:{name:_0xe03ax7[_0x8109[23]][_0x8109[22]],id:{$ne:_0xe03ax7[_0x8109[23]][_0x8109[18]]}}})[_0x8109[12]](function(_0xe03axf){if(!_0xe03axf){return _0xe03ax8[_0x8109[17]](404)};if(_0xe03axf[_0x8109[33]]>0){return _0xe03ax8[_0x8109[11]](500)[_0x8109[10]]({message:_0x8109[29]})};if(_0xe03ax7[_0x8109[23]][_0x8109[18]]){delete _0xe03ax7[_0x8109[23]][_0x8109[18]]};return VoiceContext[_0x8109[20]](_0xe03ax7[_0x8109[19]][_0x8109[18]])})[_0x8109[12]](function(_0xe03axc){if(!_0xe03axc){return _0xe03ax8[_0x8109[17]](404)};var _0xe03axe=_[_0x8109[31]](_0xe03axc,_0xe03ax7[_0x8109[23]]);return _0xe03axe[_0x8109[32]]()})[_0x8109[12]](function(_0xe03axc){return _0xe03ax8[_0x8109[11]](200)[_0x8109[10]](_0xe03axc)})[_0x8109[9]](function(_0xe03axa){return handleError(_0xe03ax8,_0xe03axa)})};exports[_0x8109[34]]=function(_0xe03ax7,_0xe03ax8){var _0xe03ax10;return VoiceContext[_0x8109[20]](_0xe03ax7[_0x8109[19]][_0x8109[18]])[_0x8109[12]](function(_0xe03axc){_0xe03ax10=_0xe03axc;if(!_0xe03ax10){return _0xe03ax8[_0x8109[17]](404)};if(_0xe03ax10[_0x8109[39]]){return _0xe03ax8[_0x8109[11]](500)[_0x8109[10]]({message:_0x8109[40],translatedMessage:_0x8109[41]})};return VoiceExtension[_0x8109[24]]({where:{context:_0xe03ax10[_0x8109[22]],VoiceContextId:null}})})[_0x8109[12]](function(_0xe03ax11){console[_0x8109[36]](_0xe03ax11);if(_0xe03ax11[_0x8109[33]]>0){return _0xe03ax8[_0x8109[11]](500)[_0x8109[10]]({message:_0x8109[37],translatedMessage:_0x8109[38]})};return _0xe03ax10[_0x8109[34]]()})[_0x8109[12]](function(){return _0xe03ax8[_0x8109[17]](204)})[_0x8109[9]](function(_0xe03axa){console[_0x8109[36]](_0x8109[35],_0xe03axa);return handleError(_0xe03ax8,_0xe03axa)})};exports[_0x8109[42]]=function(_0xe03ax7,_0xe03ax8){var _0xe03ax12;return VoiceContext[_0x8109[24]]({where:{id:_0xe03ax7[_0x8109[13]][_0x8109[43]]}})[_0x8109[12]](function(_0xe03axd){_0xe03ax12=_0xe03axd;var _0xe03ax13=_[_0x8109[44]](_0xe03ax12,{defaultEntry:true});if(_0xe03ax13){return _0xe03ax8[_0x8109[11]](500)[_0x8109[10]]({message:_0x8109[40],translatedMessage:_0x8109[41]})};if(!_0xe03ax12){return _0xe03ax8[_0x8109[17]](404)};var _0xe03ax14=_[_0x8109[46]](_[_0x8109[46]](_0xe03ax12,_0x8109[45]),_0x8109[22]);return VoiceExtension[_0x8109[24]]({where:{context:_0xe03ax14,VoiceContextId:null}})})[_0x8109[12]](function(_0xe03ax11){if(_0xe03ax11[_0x8109[33]]>_0xe03ax12[_0x8109[33]]){return _0xe03ax8[_0x8109[11]](500)[_0x8109[10]]({message:_0x8109[37],translatedMessage:_0x8109[38]})};return VoiceContext[_0x8109[34]]({where:{id:_0xe03ax7[_0x8109[13]][_0x8109[43]]},individualHooks:true})})[_0x8109[12]](function(){return _0xe03ax8[_0x8109[17]](204)})[_0x8109[9]](function(_0xe03axa){console[_0x8109[36]](_0xe03axa);return handleError(_0xe03ax8,_0xe03axa)})};function handleError(_0xe03ax8,_0xe03axa){return _0xe03ax8[_0x8109[11]](500)[_0x8109[10]](_0xe03axa)}
\ No newline at end of file