Built motion from commit 2239aeb.|0.0.113
[motion.git] / server / api / voice_context / voice_context.controller.js
index d895d07..6a1f26f 100644 (file)
@@ -1 +1 @@
-var _0x7ca8=["\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"];_0x7ca8[0];var _=require(_0x7ca8[1]);var util=require(_0x7ca8[2]);var Util=require(_0x7ca8[3]);var sequelize=require(_0x7ca8[5])[_0x7ca8[4]];var VoiceContext=require(_0x7ca8[5])[_0x7ca8[6]];var VoiceExtension=require(_0x7ca8[5])[_0x7ca8[7]];exports[_0x7ca8[8]]=function(_0xb5dbx7,_0xb5dbx8,_0xb5dbx9){return VoiceContext[_0x7ca8[15]](Util[_0x7ca8[14]](_0xb5dbx7[_0x7ca8[13]]))[_0x7ca8[12]](function(_0xb5dbxb){_0xb5dbx8[_0x7ca8[11]](200)[_0x7ca8[10]](_0xb5dbxb)})[_0x7ca8[9]](function(_0xb5dbxa){return handleError(_0xb5dbx8,_0xb5dbxa)})};exports[_0x7ca8[16]]=function(_0xb5dbx7,_0xb5dbx8){return VoiceContext[_0x7ca8[20]](_0xb5dbx7[_0x7ca8[19]][_0x7ca8[18]])[_0x7ca8[12]](function(_0xb5dbxc){if(!_0xb5dbxc){return _0xb5dbx8[_0x7ca8[17]](404)};return _0xb5dbx8[_0x7ca8[10]](_0xb5dbxc)})[_0x7ca8[9]](function(_0xb5dbxa){return handleError(_0xb5dbx8,_0xb5dbxa)})};exports[_0x7ca8[21]]=function(_0xb5dbx7,_0xb5dbx8){return VoiceContext[_0x7ca8[24]]({where:{name:_0xb5dbx7[_0x7ca8[23]][_0x7ca8[22]]}})[_0x7ca8[12]](function(_0xb5dbxd){if(!_0xb5dbxd){return _0xb5dbx8[_0x7ca8[17]](404)};return _0xb5dbx8[_0x7ca8[10]](_0xb5dbxd)})[_0x7ca8[9]](function(_0xb5dbxa){return handleError(_0xb5dbx8,_0xb5dbxa)})};exports[_0x7ca8[25]]=function(_0xb5dbx7,_0xb5dbx8){return VoiceContext[_0x7ca8[25]](_0xb5dbx7[_0x7ca8[23]])[_0x7ca8[12]](function(_0xb5dbxc){return _0xb5dbx8[_0x7ca8[11]](201)[_0x7ca8[10]](_0xb5dbxc)})[_0x7ca8[9]](sequelize.UniqueConstraintError,function(_0xb5dbxa){_0xb5dbxa[_0x7ca8[26]]=_0x7ca8[27];_0xb5dbxa[_0x7ca8[28]]=_0x7ca8[29];return handleError(_0xb5dbx8,_0xb5dbxa)})[_0x7ca8[9]](function(_0xb5dbxa){return handleError(_0xb5dbx8,_0xb5dbxa)})};exports[_0x7ca8[30]]=function(_0xb5dbx7,_0xb5dbx8){return VoiceContext[_0x7ca8[24]]({where:{name:_0xb5dbx7[_0x7ca8[23]][_0x7ca8[22]],id:{$ne:_0xb5dbx7[_0x7ca8[23]][_0x7ca8[18]]}}})[_0x7ca8[12]](function(_0xb5dbxf){if(!_0xb5dbxf){return _0xb5dbx8[_0x7ca8[17]](404)};if(_0xb5dbxf[_0x7ca8[33]]>0){return _0xb5dbx8[_0x7ca8[11]](500)[_0x7ca8[10]]({message:_0x7ca8[29]})};if(_0xb5dbx7[_0x7ca8[23]][_0x7ca8[18]]){delete _0xb5dbx7[_0x7ca8[23]][_0x7ca8[18]]};return VoiceContext[_0x7ca8[20]](_0xb5dbx7[_0x7ca8[19]][_0x7ca8[18]])})[_0x7ca8[12]](function(_0xb5dbxc){if(!_0xb5dbxc){return _0xb5dbx8[_0x7ca8[17]](404)};var _0xb5dbxe=_[_0x7ca8[31]](_0xb5dbxc,_0xb5dbx7[_0x7ca8[23]]);return _0xb5dbxe[_0x7ca8[32]]()})[_0x7ca8[12]](function(_0xb5dbxc){return _0xb5dbx8[_0x7ca8[11]](200)[_0x7ca8[10]](_0xb5dbxc)})[_0x7ca8[9]](function(_0xb5dbxa){return handleError(_0xb5dbx8,_0xb5dbxa)})};exports[_0x7ca8[34]]=function(_0xb5dbx7,_0xb5dbx8){var _0xb5dbx10;return VoiceContext[_0x7ca8[20]](_0xb5dbx7[_0x7ca8[19]][_0x7ca8[18]])[_0x7ca8[12]](function(_0xb5dbxc){_0xb5dbx10=_0xb5dbxc;if(!_0xb5dbx10){return _0xb5dbx8[_0x7ca8[17]](404)};if(_0xb5dbx10[_0x7ca8[39]]){return _0xb5dbx8[_0x7ca8[11]](500)[_0x7ca8[10]]({message:_0x7ca8[40],translatedMessage:_0x7ca8[41]})};return VoiceExtension[_0x7ca8[24]]({where:{context:_0xb5dbx10[_0x7ca8[22]],VoiceContextId:null}})})[_0x7ca8[12]](function(_0xb5dbx11){console[_0x7ca8[36]](_0xb5dbx11);if(_0xb5dbx11[_0x7ca8[33]]>0){return _0xb5dbx8[_0x7ca8[11]](500)[_0x7ca8[10]]({message:_0x7ca8[37],translatedMessage:_0x7ca8[38]})};return _0xb5dbx10[_0x7ca8[34]]()})[_0x7ca8[12]](function(){return _0xb5dbx8[_0x7ca8[17]](204)})[_0x7ca8[9]](function(_0xb5dbxa){console[_0x7ca8[36]](_0x7ca8[35],_0xb5dbxa);return handleError(_0xb5dbx8,_0xb5dbxa)})};exports[_0x7ca8[42]]=function(_0xb5dbx7,_0xb5dbx8){var _0xb5dbx12;return VoiceContext[_0x7ca8[24]]({where:{id:_0xb5dbx7[_0x7ca8[13]][_0x7ca8[43]]}})[_0x7ca8[12]](function(_0xb5dbxd){_0xb5dbx12=_0xb5dbxd;var _0xb5dbx13=_[_0x7ca8[44]](_0xb5dbx12,{defaultEntry:true});if(_0xb5dbx13){return _0xb5dbx8[_0x7ca8[11]](500)[_0x7ca8[10]]({message:_0x7ca8[40],translatedMessage:_0x7ca8[41]})};if(!_0xb5dbx12){return _0xb5dbx8[_0x7ca8[17]](404)};var _0xb5dbx14=_[_0x7ca8[46]](_[_0x7ca8[46]](_0xb5dbx12,_0x7ca8[45]),_0x7ca8[22]);return VoiceExtension[_0x7ca8[24]]({where:{context:_0xb5dbx14,VoiceContextId:null}})})[_0x7ca8[12]](function(_0xb5dbx11){if(_0xb5dbx11[_0x7ca8[33]]>_0xb5dbx12[_0x7ca8[33]]){return _0xb5dbx8[_0x7ca8[11]](500)[_0x7ca8[10]]({message:_0x7ca8[37],translatedMessage:_0x7ca8[38]})};return VoiceContext[_0x7ca8[34]]({where:{id:_0xb5dbx7[_0x7ca8[13]][_0x7ca8[43]]},individualHooks:true})})[_0x7ca8[12]](function(){return _0xb5dbx8[_0x7ca8[17]](204)})[_0x7ca8[9]](function(_0xb5dbxa){console[_0x7ca8[36]](_0xb5dbxa);return handleError(_0xb5dbx8,_0xb5dbxa)})};function handleError(_0xb5dbx8,_0xb5dbxa){return _0xb5dbx8[_0x7ca8[11]](500)[_0x7ca8[10]](_0xb5dbxa)}
\ No newline at end of file
+var _0x184e=["\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"];_0x184e[0];var _=require(_0x184e[1]);var util=require(_0x184e[2]);var Util=require(_0x184e[3]);var sequelize=require(_0x184e[5])[_0x184e[4]];var VoiceContext=require(_0x184e[5])[_0x184e[6]];var VoiceExtension=require(_0x184e[5])[_0x184e[7]];exports[_0x184e[8]]= function(_0xc1b0x7,_0xc1b0x8,_0xc1b0x9){return VoiceContext[_0x184e[15]](Util[_0x184e[14]](_0xc1b0x7[_0x184e[13]]))[_0x184e[12]](function(_0xc1b0xb){_0xc1b0x8[_0x184e[11]](200)[_0x184e[10]](_0xc1b0xb)})[_0x184e[9]](function(_0xc1b0xa){return handleError(_0xc1b0x8,_0xc1b0xa)})};exports[_0x184e[16]]= function(_0xc1b0x7,_0xc1b0x8){return VoiceContext[_0x184e[20]](_0xc1b0x7[_0x184e[19]][_0x184e[18]])[_0x184e[12]](function(_0xc1b0xc){if(!_0xc1b0xc){return _0xc1b0x8[_0x184e[17]](404)};return _0xc1b0x8[_0x184e[10]](_0xc1b0xc)})[_0x184e[9]](function(_0xc1b0xa){return handleError(_0xc1b0x8,_0xc1b0xa)})};exports[_0x184e[21]]= function(_0xc1b0x7,_0xc1b0x8){return VoiceContext[_0x184e[24]]({where:{name:_0xc1b0x7[_0x184e[23]][_0x184e[22]]}})[_0x184e[12]](function(_0xc1b0xd){if(!_0xc1b0xd){return _0xc1b0x8[_0x184e[17]](404)};return _0xc1b0x8[_0x184e[10]](_0xc1b0xd)})[_0x184e[9]](function(_0xc1b0xa){return handleError(_0xc1b0x8,_0xc1b0xa)})};exports[_0x184e[25]]= function(_0xc1b0x7,_0xc1b0x8){return VoiceContext[_0x184e[25]](_0xc1b0x7[_0x184e[23]])[_0x184e[12]](function(_0xc1b0xc){return _0xc1b0x8[_0x184e[11]](201)[_0x184e[10]](_0xc1b0xc)})[_0x184e[9]](sequelize.UniqueConstraintError,function(_0xc1b0xa){_0xc1b0xa[_0x184e[26]]= _0x184e[27];_0xc1b0xa[_0x184e[28]]= _0x184e[29];return handleError(_0xc1b0x8,_0xc1b0xa)})[_0x184e[9]](function(_0xc1b0xa){return handleError(_0xc1b0x8,_0xc1b0xa)})};exports[_0x184e[30]]= function(_0xc1b0x7,_0xc1b0x8){return VoiceContext[_0x184e[24]]({where:{name:_0xc1b0x7[_0x184e[23]][_0x184e[22]],id:{$ne:_0xc1b0x7[_0x184e[23]][_0x184e[18]]}}})[_0x184e[12]](function(_0xc1b0xf){if(!_0xc1b0xf){return _0xc1b0x8[_0x184e[17]](404)};if(_0xc1b0xf[_0x184e[33]]> 0){return _0xc1b0x8[_0x184e[11]](500)[_0x184e[10]]({message:_0x184e[29]})};if(_0xc1b0x7[_0x184e[23]][_0x184e[18]]){delete _0xc1b0x7[_0x184e[23]][_0x184e[18]]};return VoiceContext[_0x184e[20]](_0xc1b0x7[_0x184e[19]][_0x184e[18]])})[_0x184e[12]](function(_0xc1b0xc){if(!_0xc1b0xc){return _0xc1b0x8[_0x184e[17]](404)};var _0xc1b0xe=_[_0x184e[31]](_0xc1b0xc,_0xc1b0x7[_0x184e[23]]);return _0xc1b0xe[_0x184e[32]]()})[_0x184e[12]](function(_0xc1b0xc){return _0xc1b0x8[_0x184e[11]](200)[_0x184e[10]](_0xc1b0xc)})[_0x184e[9]](function(_0xc1b0xa){return handleError(_0xc1b0x8,_0xc1b0xa)})};exports[_0x184e[34]]= function(_0xc1b0x7,_0xc1b0x8){var _0xc1b0x10;return VoiceContext[_0x184e[20]](_0xc1b0x7[_0x184e[19]][_0x184e[18]])[_0x184e[12]](function(_0xc1b0xc){_0xc1b0x10= _0xc1b0xc;if(!_0xc1b0x10){return _0xc1b0x8[_0x184e[17]](404)};if(_0xc1b0x10[_0x184e[39]]){return _0xc1b0x8[_0x184e[11]](500)[_0x184e[10]]({message:_0x184e[40],translatedMessage:_0x184e[41]})};return VoiceExtension[_0x184e[24]]({where:{context:_0xc1b0x10[_0x184e[22]],VoiceContextId:null}})})[_0x184e[12]](function(_0xc1b0x11){console[_0x184e[36]](_0xc1b0x11);if(_0xc1b0x11[_0x184e[33]]> 0){return _0xc1b0x8[_0x184e[11]](500)[_0x184e[10]]({message:_0x184e[37],translatedMessage:_0x184e[38]})};return _0xc1b0x10[_0x184e[34]]()})[_0x184e[12]](function(){return _0xc1b0x8[_0x184e[17]](204)})[_0x184e[9]](function(_0xc1b0xa){console[_0x184e[36]](_0x184e[35],_0xc1b0xa);return handleError(_0xc1b0x8,_0xc1b0xa)})};exports[_0x184e[42]]= function(_0xc1b0x7,_0xc1b0x8){var _0xc1b0x12;return VoiceContext[_0x184e[24]]({where:{id:_0xc1b0x7[_0x184e[13]][_0x184e[43]]}})[_0x184e[12]](function(_0xc1b0xd){_0xc1b0x12= _0xc1b0xd;var _0xc1b0x13=_[_0x184e[44]](_0xc1b0x12,{defaultEntry:true});if(_0xc1b0x13){return _0xc1b0x8[_0x184e[11]](500)[_0x184e[10]]({message:_0x184e[40],translatedMessage:_0x184e[41]})};if(!_0xc1b0x12){return _0xc1b0x8[_0x184e[17]](404)};var _0xc1b0x14=_[_0x184e[46]](_[_0x184e[46]](_0xc1b0x12,_0x184e[45]),_0x184e[22]);return VoiceExtension[_0x184e[24]]({where:{context:_0xc1b0x14,VoiceContextId:null}})})[_0x184e[12]](function(_0xc1b0x11){if(_0xc1b0x11[_0x184e[33]]> _0xc1b0x12[_0x184e[33]]){return _0xc1b0x8[_0x184e[11]](500)[_0x184e[10]]({message:_0x184e[37],translatedMessage:_0x184e[38]})};return VoiceContext[_0x184e[34]]({where:{id:_0xc1b0x7[_0x184e[13]][_0x184e[43]]},individualHooks:true})})[_0x184e[12]](function(){return _0xc1b0x8[_0x184e[17]](204)})[_0x184e[9]](function(_0xc1b0xa){console[_0x184e[36]](_0xc1b0xa);return handleError(_0xc1b0x8,_0xc1b0xa)})};function handleError(_0xc1b0x8,_0xc1b0xa){return _0xc1b0x8[_0x184e[11]](500)[_0x184e[10]](_0xc1b0xa)}
\ No newline at end of file