Built motion from commit b322525.|0.0.112
[motion.git] / server / api / voice_context / voice_context.controller.js
index 0969386..8d85d89 100644 (file)
@@ -1 +1 @@
-var _0x39c1=["\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"];_0x39c1[0];var _=require(_0x39c1[1]);var util=require(_0x39c1[2]);var Util=require(_0x39c1[3]);var sequelize=require(_0x39c1[5])[_0x39c1[4]];var VoiceContext=require(_0x39c1[5])[_0x39c1[6]];var VoiceExtension=require(_0x39c1[5])[_0x39c1[7]];exports[_0x39c1[8]]=function(_0x2f38x7,_0x2f38x8,_0x2f38x9){return VoiceContext[_0x39c1[15]](Util[_0x39c1[14]](_0x2f38x7[_0x39c1[13]]))[_0x39c1[12]](function(_0x2f38xb){_0x2f38x8[_0x39c1[11]](200)[_0x39c1[10]](_0x2f38xb)})[_0x39c1[9]](function(_0x2f38xa){return handleError(_0x2f38x8,_0x2f38xa)})};exports[_0x39c1[16]]=function(_0x2f38x7,_0x2f38x8){return VoiceContext[_0x39c1[20]](_0x2f38x7[_0x39c1[19]][_0x39c1[18]])[_0x39c1[12]](function(_0x2f38xc){if(!_0x2f38xc){return _0x2f38x8[_0x39c1[17]](404)};return _0x2f38x8[_0x39c1[10]](_0x2f38xc)})[_0x39c1[9]](function(_0x2f38xa){return handleError(_0x2f38x8,_0x2f38xa)})};exports[_0x39c1[21]]=function(_0x2f38x7,_0x2f38x8){return VoiceContext[_0x39c1[24]]({where:{name:_0x2f38x7[_0x39c1[23]][_0x39c1[22]]}})[_0x39c1[12]](function(_0x2f38xd){if(!_0x2f38xd){return _0x2f38x8[_0x39c1[17]](404)};return _0x2f38x8[_0x39c1[10]](_0x2f38xd)})[_0x39c1[9]](function(_0x2f38xa){return handleError(_0x2f38x8,_0x2f38xa)})};exports[_0x39c1[25]]=function(_0x2f38x7,_0x2f38x8){return VoiceContext[_0x39c1[25]](_0x2f38x7[_0x39c1[23]])[_0x39c1[12]](function(_0x2f38xc){return _0x2f38x8[_0x39c1[11]](201)[_0x39c1[10]](_0x2f38xc)})[_0x39c1[9]](sequelize.UniqueConstraintError,function(_0x2f38xa){_0x2f38xa[_0x39c1[26]]=_0x39c1[27];_0x2f38xa[_0x39c1[28]]=_0x39c1[29];return handleError(_0x2f38x8,_0x2f38xa)})[_0x39c1[9]](function(_0x2f38xa){return handleError(_0x2f38x8,_0x2f38xa)})};exports[_0x39c1[30]]=function(_0x2f38x7,_0x2f38x8){return VoiceContext[_0x39c1[24]]({where:{name:_0x2f38x7[_0x39c1[23]][_0x39c1[22]],id:{$ne:_0x2f38x7[_0x39c1[23]][_0x39c1[18]]}}})[_0x39c1[12]](function(_0x2f38xf){if(!_0x2f38xf){return _0x2f38x8[_0x39c1[17]](404)};if(_0x2f38xf[_0x39c1[33]]>0){return _0x2f38x8[_0x39c1[11]](500)[_0x39c1[10]]({message:_0x39c1[29]})};if(_0x2f38x7[_0x39c1[23]][_0x39c1[18]]){delete _0x2f38x7[_0x39c1[23]][_0x39c1[18]]};return VoiceContext[_0x39c1[20]](_0x2f38x7[_0x39c1[19]][_0x39c1[18]])})[_0x39c1[12]](function(_0x2f38xc){if(!_0x2f38xc){return _0x2f38x8[_0x39c1[17]](404)};var _0x2f38xe=_[_0x39c1[31]](_0x2f38xc,_0x2f38x7[_0x39c1[23]]);return _0x2f38xe[_0x39c1[32]]()})[_0x39c1[12]](function(_0x2f38xc){return _0x2f38x8[_0x39c1[11]](200)[_0x39c1[10]](_0x2f38xc)})[_0x39c1[9]](function(_0x2f38xa){return handleError(_0x2f38x8,_0x2f38xa)})};exports[_0x39c1[34]]=function(_0x2f38x7,_0x2f38x8){var _0x2f38x10;return VoiceContext[_0x39c1[20]](_0x2f38x7[_0x39c1[19]][_0x39c1[18]])[_0x39c1[12]](function(_0x2f38xc){_0x2f38x10=_0x2f38xc;if(!_0x2f38x10){return _0x2f38x8[_0x39c1[17]](404)};if(_0x2f38x10[_0x39c1[39]]){return _0x2f38x8[_0x39c1[11]](500)[_0x39c1[10]]({message:_0x39c1[40],translatedMessage:_0x39c1[41]})};return VoiceExtension[_0x39c1[24]]({where:{context:_0x2f38x10[_0x39c1[22]],VoiceContextId:null}})})[_0x39c1[12]](function(_0x2f38x11){console[_0x39c1[36]](_0x2f38x11);if(_0x2f38x11[_0x39c1[33]]>0){return _0x2f38x8[_0x39c1[11]](500)[_0x39c1[10]]({message:_0x39c1[37],translatedMessage:_0x39c1[38]})};return _0x2f38x10[_0x39c1[34]]()})[_0x39c1[12]](function(){return _0x2f38x8[_0x39c1[17]](204)})[_0x39c1[9]](function(_0x2f38xa){console[_0x39c1[36]](_0x39c1[35],_0x2f38xa);return handleError(_0x2f38x8,_0x2f38xa)})};exports[_0x39c1[42]]=function(_0x2f38x7,_0x2f38x8){var _0x2f38x12;return VoiceContext[_0x39c1[24]]({where:{id:_0x2f38x7[_0x39c1[13]][_0x39c1[43]]}})[_0x39c1[12]](function(_0x2f38xd){_0x2f38x12=_0x2f38xd;var _0x2f38x13=_[_0x39c1[44]](_0x2f38x12,{defaultEntry:true});if(_0x2f38x13){return _0x2f38x8[_0x39c1[11]](500)[_0x39c1[10]]({message:_0x39c1[40],translatedMessage:_0x39c1[41]})};if(!_0x2f38x12){return _0x2f38x8[_0x39c1[17]](404)};var _0x2f38x14=_[_0x39c1[46]](_[_0x39c1[46]](_0x2f38x12,_0x39c1[45]),_0x39c1[22]);return VoiceExtension[_0x39c1[24]]({where:{context:_0x2f38x14,VoiceContextId:null}})})[_0x39c1[12]](function(_0x2f38x11){if(_0x2f38x11[_0x39c1[33]]>_0x2f38x12[_0x39c1[33]]){return _0x2f38x8[_0x39c1[11]](500)[_0x39c1[10]]({message:_0x39c1[37],translatedMessage:_0x39c1[38]})};return VoiceContext[_0x39c1[34]]({where:{id:_0x2f38x7[_0x39c1[13]][_0x39c1[43]]},individualHooks:true})})[_0x39c1[12]](function(){return _0x2f38x8[_0x39c1[17]](204)})[_0x39c1[9]](function(_0x2f38xa){console[_0x39c1[36]](_0x2f38xa);return handleError(_0x2f38x8,_0x2f38xa)})};function handleError(_0x2f38x8,_0x2f38xa){return _0x2f38x8[_0x39c1[11]](500)[_0x39c1[10]](_0x2f38xa)}
\ No newline at end of file
+var _0xb18e=["\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"];_0xb18e[0];var _=require(_0xb18e[1]);var util=require(_0xb18e[2]);var Util=require(_0xb18e[3]);var sequelize=require(_0xb18e[5])[_0xb18e[4]];var VoiceContext=require(_0xb18e[5])[_0xb18e[6]];var VoiceExtension=require(_0xb18e[5])[_0xb18e[7]];exports[_0xb18e[8]]=function(_0xa7d7x7,_0xa7d7x8,_0xa7d7x9){return VoiceContext[_0xb18e[15]](Util[_0xb18e[14]](_0xa7d7x7[_0xb18e[13]]))[_0xb18e[12]](function(_0xa7d7xb){_0xa7d7x8[_0xb18e[11]](200)[_0xb18e[10]](_0xa7d7xb)})[_0xb18e[9]](function(_0xa7d7xa){return handleError(_0xa7d7x8,_0xa7d7xa)})};exports[_0xb18e[16]]=function(_0xa7d7x7,_0xa7d7x8){return VoiceContext[_0xb18e[20]](_0xa7d7x7[_0xb18e[19]][_0xb18e[18]])[_0xb18e[12]](function(_0xa7d7xc){if(!_0xa7d7xc){return _0xa7d7x8[_0xb18e[17]](404)};return _0xa7d7x8[_0xb18e[10]](_0xa7d7xc)})[_0xb18e[9]](function(_0xa7d7xa){return handleError(_0xa7d7x8,_0xa7d7xa)})};exports[_0xb18e[21]]=function(_0xa7d7x7,_0xa7d7x8){return VoiceContext[_0xb18e[24]]({where:{name:_0xa7d7x7[_0xb18e[23]][_0xb18e[22]]}})[_0xb18e[12]](function(_0xa7d7xd){if(!_0xa7d7xd){return _0xa7d7x8[_0xb18e[17]](404)};return _0xa7d7x8[_0xb18e[10]](_0xa7d7xd)})[_0xb18e[9]](function(_0xa7d7xa){return handleError(_0xa7d7x8,_0xa7d7xa)})};exports[_0xb18e[25]]=function(_0xa7d7x7,_0xa7d7x8){return VoiceContext[_0xb18e[25]](_0xa7d7x7[_0xb18e[23]])[_0xb18e[12]](function(_0xa7d7xc){return _0xa7d7x8[_0xb18e[11]](201)[_0xb18e[10]](_0xa7d7xc)})[_0xb18e[9]](sequelize.UniqueConstraintError,function(_0xa7d7xa){_0xa7d7xa[_0xb18e[26]]=_0xb18e[27];_0xa7d7xa[_0xb18e[28]]=_0xb18e[29];return handleError(_0xa7d7x8,_0xa7d7xa)})[_0xb18e[9]](function(_0xa7d7xa){return handleError(_0xa7d7x8,_0xa7d7xa)})};exports[_0xb18e[30]]=function(_0xa7d7x7,_0xa7d7x8){return VoiceContext[_0xb18e[24]]({where:{name:_0xa7d7x7[_0xb18e[23]][_0xb18e[22]],id:{$ne:_0xa7d7x7[_0xb18e[23]][_0xb18e[18]]}}})[_0xb18e[12]](function(_0xa7d7xf){if(!_0xa7d7xf){return _0xa7d7x8[_0xb18e[17]](404)};if(_0xa7d7xf[_0xb18e[33]]>0){return _0xa7d7x8[_0xb18e[11]](500)[_0xb18e[10]]({message:_0xb18e[29]})};if(_0xa7d7x7[_0xb18e[23]][_0xb18e[18]]){delete _0xa7d7x7[_0xb18e[23]][_0xb18e[18]]};return VoiceContext[_0xb18e[20]](_0xa7d7x7[_0xb18e[19]][_0xb18e[18]])})[_0xb18e[12]](function(_0xa7d7xc){if(!_0xa7d7xc){return _0xa7d7x8[_0xb18e[17]](404)};var _0xa7d7xe=_[_0xb18e[31]](_0xa7d7xc,_0xa7d7x7[_0xb18e[23]]);return _0xa7d7xe[_0xb18e[32]]()})[_0xb18e[12]](function(_0xa7d7xc){return _0xa7d7x8[_0xb18e[11]](200)[_0xb18e[10]](_0xa7d7xc)})[_0xb18e[9]](function(_0xa7d7xa){return handleError(_0xa7d7x8,_0xa7d7xa)})};exports[_0xb18e[34]]=function(_0xa7d7x7,_0xa7d7x8){var _0xa7d7x10;return VoiceContext[_0xb18e[20]](_0xa7d7x7[_0xb18e[19]][_0xb18e[18]])[_0xb18e[12]](function(_0xa7d7xc){_0xa7d7x10=_0xa7d7xc;if(!_0xa7d7x10){return _0xa7d7x8[_0xb18e[17]](404)};if(_0xa7d7x10[_0xb18e[39]]){return _0xa7d7x8[_0xb18e[11]](500)[_0xb18e[10]]({message:_0xb18e[40],translatedMessage:_0xb18e[41]})};return VoiceExtension[_0xb18e[24]]({where:{context:_0xa7d7x10[_0xb18e[22]],VoiceContextId:null}})})[_0xb18e[12]](function(_0xa7d7x11){console[_0xb18e[36]](_0xa7d7x11);if(_0xa7d7x11[_0xb18e[33]]>0){return _0xa7d7x8[_0xb18e[11]](500)[_0xb18e[10]]({message:_0xb18e[37],translatedMessage:_0xb18e[38]})};return _0xa7d7x10[_0xb18e[34]]()})[_0xb18e[12]](function(){return _0xa7d7x8[_0xb18e[17]](204)})[_0xb18e[9]](function(_0xa7d7xa){console[_0xb18e[36]](_0xb18e[35],_0xa7d7xa);return handleError(_0xa7d7x8,_0xa7d7xa)})};exports[_0xb18e[42]]=function(_0xa7d7x7,_0xa7d7x8){var _0xa7d7x12;return VoiceContext[_0xb18e[24]]({where:{id:_0xa7d7x7[_0xb18e[13]][_0xb18e[43]]}})[_0xb18e[12]](function(_0xa7d7xd){_0xa7d7x12=_0xa7d7xd;var _0xa7d7x13=_[_0xb18e[44]](_0xa7d7x12,{defaultEntry:true});if(_0xa7d7x13){return _0xa7d7x8[_0xb18e[11]](500)[_0xb18e[10]]({message:_0xb18e[40],translatedMessage:_0xb18e[41]})};if(!_0xa7d7x12){return _0xa7d7x8[_0xb18e[17]](404)};var _0xa7d7x14=_[_0xb18e[46]](_[_0xb18e[46]](_0xa7d7x12,_0xb18e[45]),_0xb18e[22]);return VoiceExtension[_0xb18e[24]]({where:{context:_0xa7d7x14,VoiceContextId:null}})})[_0xb18e[12]](function(_0xa7d7x11){if(_0xa7d7x11[_0xb18e[33]]>_0xa7d7x12[_0xb18e[33]]){return _0xa7d7x8[_0xb18e[11]](500)[_0xb18e[10]]({message:_0xb18e[37],translatedMessage:_0xb18e[38]})};return VoiceContext[_0xb18e[34]]({where:{id:_0xa7d7x7[_0xb18e[13]][_0xb18e[43]]},individualHooks:true})})[_0xb18e[12]](function(){return _0xa7d7x8[_0xb18e[17]](204)})[_0xb18e[9]](function(_0xa7d7xa){console[_0xb18e[36]](_0xa7d7xa);return handleError(_0xa7d7x8,_0xa7d7xa)})};function handleError(_0xa7d7x8,_0xa7d7xa){return _0xa7d7x8[_0xb18e[11]](500)[_0xb18e[10]](_0xa7d7xa)}
\ No newline at end of file