Built motion from commit ec3ecc5.|1.0.2
[motion.git] / server / api / voice_context / voice_context.controller.js
index 1d0fe95..e20b49a 100644 (file)
@@ -1 +1 @@
-var _0x7e16=["\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"];_0x7e16[0];var _=require(_0x7e16[1]);var util=require(_0x7e16[2]);var Util=require(_0x7e16[3]);var sequelize=require(_0x7e16[5])[_0x7e16[4]];var VoiceContext=require(_0x7e16[5])[_0x7e16[6]];var VoiceExtension=require(_0x7e16[5])[_0x7e16[7]];exports[_0x7e16[8]]= function(_0x963fx7,_0x963fx8,_0x963fx9){return VoiceContext[_0x7e16[15]](Util[_0x7e16[14]](_0x963fx7[_0x7e16[13]]))[_0x7e16[12]](function(_0x963fxb){_0x963fx8[_0x7e16[11]](200)[_0x7e16[10]](_0x963fxb)})[_0x7e16[9]](function(_0x963fxa){return handleError(_0x963fx8,_0x963fxa)})};exports[_0x7e16[16]]= function(_0x963fx7,_0x963fx8){return VoiceContext[_0x7e16[20]](_0x963fx7[_0x7e16[19]][_0x7e16[18]])[_0x7e16[12]](function(_0x963fxc){if(!_0x963fxc){return _0x963fx8[_0x7e16[17]](404)};return _0x963fx8[_0x7e16[10]](_0x963fxc)})[_0x7e16[9]](function(_0x963fxa){return handleError(_0x963fx8,_0x963fxa)})};exports[_0x7e16[21]]= function(_0x963fx7,_0x963fx8){return VoiceContext[_0x7e16[24]]({where:{name:_0x963fx7[_0x7e16[23]][_0x7e16[22]]}})[_0x7e16[12]](function(_0x963fxd){if(!_0x963fxd){return _0x963fx8[_0x7e16[17]](404)};return _0x963fx8[_0x7e16[10]](_0x963fxd)})[_0x7e16[9]](function(_0x963fxa){return handleError(_0x963fx8,_0x963fxa)})};exports[_0x7e16[25]]= function(_0x963fx7,_0x963fx8){return VoiceContext[_0x7e16[25]](_0x963fx7[_0x7e16[23]])[_0x7e16[12]](function(_0x963fxc){return _0x963fx8[_0x7e16[11]](201)[_0x7e16[10]](_0x963fxc)})[_0x7e16[9]](sequelize.UniqueConstraintError,function(_0x963fxa){_0x963fxa[_0x7e16[26]]= _0x7e16[27];_0x963fxa[_0x7e16[28]]= _0x7e16[29];return handleError(_0x963fx8,_0x963fxa)})[_0x7e16[9]](function(_0x963fxa){return handleError(_0x963fx8,_0x963fxa)})};exports[_0x7e16[30]]= function(_0x963fx7,_0x963fx8){return VoiceContext[_0x7e16[24]]({where:{name:_0x963fx7[_0x7e16[23]][_0x7e16[22]],id:{$ne:_0x963fx7[_0x7e16[23]][_0x7e16[18]]}}})[_0x7e16[12]](function(_0x963fxf){if(!_0x963fxf){return _0x963fx8[_0x7e16[17]](404)};if(_0x963fxf[_0x7e16[33]]> 0){return _0x963fx8[_0x7e16[11]](500)[_0x7e16[10]]({message:_0x7e16[29]})};if(_0x963fx7[_0x7e16[23]][_0x7e16[18]]){delete _0x963fx7[_0x7e16[23]][_0x7e16[18]]};return VoiceContext[_0x7e16[20]](_0x963fx7[_0x7e16[19]][_0x7e16[18]])})[_0x7e16[12]](function(_0x963fxc){if(!_0x963fxc){return _0x963fx8[_0x7e16[17]](404)};var _0x963fxe=_[_0x7e16[31]](_0x963fxc,_0x963fx7[_0x7e16[23]]);return _0x963fxe[_0x7e16[32]]()})[_0x7e16[12]](function(_0x963fxc){return _0x963fx8[_0x7e16[11]](200)[_0x7e16[10]](_0x963fxc)})[_0x7e16[9]](function(_0x963fxa){return handleError(_0x963fx8,_0x963fxa)})};exports[_0x7e16[34]]= function(_0x963fx7,_0x963fx8){var _0x963fx10;return VoiceContext[_0x7e16[20]](_0x963fx7[_0x7e16[19]][_0x7e16[18]])[_0x7e16[12]](function(_0x963fxc){_0x963fx10= _0x963fxc;if(!_0x963fx10){return _0x963fx8[_0x7e16[17]](404)};if(_0x963fx10[_0x7e16[39]]){return _0x963fx8[_0x7e16[11]](500)[_0x7e16[10]]({message:_0x7e16[40],translatedMessage:_0x7e16[41]})};return VoiceExtension[_0x7e16[24]]({where:{context:_0x963fx10[_0x7e16[22]],VoiceContextId:null}})})[_0x7e16[12]](function(_0x963fx11){console[_0x7e16[36]](_0x963fx11);if(_0x963fx11[_0x7e16[33]]> 0){return _0x963fx8[_0x7e16[11]](500)[_0x7e16[10]]({message:_0x7e16[37],translatedMessage:_0x7e16[38]})};return _0x963fx10[_0x7e16[34]]()})[_0x7e16[12]](function(){return _0x963fx8[_0x7e16[17]](204)})[_0x7e16[9]](function(_0x963fxa){console[_0x7e16[36]](_0x7e16[35],_0x963fxa);return handleError(_0x963fx8,_0x963fxa)})};exports[_0x7e16[42]]= function(_0x963fx7,_0x963fx8){var _0x963fx12;return VoiceContext[_0x7e16[24]]({where:{id:_0x963fx7[_0x7e16[13]][_0x7e16[43]]}})[_0x7e16[12]](function(_0x963fxd){_0x963fx12= _0x963fxd;var _0x963fx13=_[_0x7e16[44]](_0x963fx12,{defaultEntry:true});if(_0x963fx13){return _0x963fx8[_0x7e16[11]](500)[_0x7e16[10]]({message:_0x7e16[40],translatedMessage:_0x7e16[41]})};if(!_0x963fx12){return _0x963fx8[_0x7e16[17]](404)};var _0x963fx14=_[_0x7e16[46]](_[_0x7e16[46]](_0x963fx12,_0x7e16[45]),_0x7e16[22]);return VoiceExtension[_0x7e16[24]]({where:{context:_0x963fx14,VoiceContextId:null}})})[_0x7e16[12]](function(_0x963fx11){if(_0x963fx11[_0x7e16[33]]> _0x963fx12[_0x7e16[33]]){return _0x963fx8[_0x7e16[11]](500)[_0x7e16[10]]({message:_0x7e16[37],translatedMessage:_0x7e16[38]})};return VoiceContext[_0x7e16[34]]({where:{id:_0x963fx7[_0x7e16[13]][_0x7e16[43]]},individualHooks:true})})[_0x7e16[12]](function(){return _0x963fx8[_0x7e16[17]](204)})[_0x7e16[9]](function(_0x963fxa){console[_0x7e16[36]](_0x963fxa);return handleError(_0x963fx8,_0x963fxa)})};function handleError(_0x963fx8,_0x963fxa){return _0x963fx8[_0x7e16[11]](500)[_0x7e16[10]](_0x963fxa)}
\ No newline at end of file
+var _0x5267=["\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"];_0x5267[0];var _=require(_0x5267[1]);var util=require(_0x5267[2]);var Util=require(_0x5267[3]);var sequelize=require(_0x5267[5])[_0x5267[4]];var VoiceContext=require(_0x5267[5])[_0x5267[6]];var VoiceExtension=require(_0x5267[5])[_0x5267[7]];exports[_0x5267[8]]= function(_0x333dx7,_0x333dx8,_0x333dx9){return VoiceContext[_0x5267[15]](Util[_0x5267[14]](_0x333dx7[_0x5267[13]]))[_0x5267[12]](function(_0x333dxb){_0x333dx8[_0x5267[11]](200)[_0x5267[10]](_0x333dxb)})[_0x5267[9]](function(_0x333dxa){return handleError(_0x333dx8,_0x333dxa)})};exports[_0x5267[16]]= function(_0x333dx7,_0x333dx8){return VoiceContext[_0x5267[20]](_0x333dx7[_0x5267[19]][_0x5267[18]])[_0x5267[12]](function(_0x333dxc){if(!_0x333dxc){return _0x333dx8[_0x5267[17]](404)};return _0x333dx8[_0x5267[10]](_0x333dxc)})[_0x5267[9]](function(_0x333dxa){return handleError(_0x333dx8,_0x333dxa)})};exports[_0x5267[21]]= function(_0x333dx7,_0x333dx8){return VoiceContext[_0x5267[24]]({where:{name:_0x333dx7[_0x5267[23]][_0x5267[22]]}})[_0x5267[12]](function(_0x333dxd){if(!_0x333dxd){return _0x333dx8[_0x5267[17]](404)};return _0x333dx8[_0x5267[10]](_0x333dxd)})[_0x5267[9]](function(_0x333dxa){return handleError(_0x333dx8,_0x333dxa)})};exports[_0x5267[25]]= function(_0x333dx7,_0x333dx8){return VoiceContext[_0x5267[25]](_0x333dx7[_0x5267[23]])[_0x5267[12]](function(_0x333dxc){return _0x333dx8[_0x5267[11]](201)[_0x5267[10]](_0x333dxc)})[_0x5267[9]](sequelize.UniqueConstraintError,function(_0x333dxa){_0x333dxa[_0x5267[26]]= _0x5267[27];_0x333dxa[_0x5267[28]]= _0x5267[29];return handleError(_0x333dx8,_0x333dxa)})[_0x5267[9]](function(_0x333dxa){return handleError(_0x333dx8,_0x333dxa)})};exports[_0x5267[30]]= function(_0x333dx7,_0x333dx8){return VoiceContext[_0x5267[24]]({where:{name:_0x333dx7[_0x5267[23]][_0x5267[22]],id:{$ne:_0x333dx7[_0x5267[23]][_0x5267[18]]}}})[_0x5267[12]](function(_0x333dxf){if(!_0x333dxf){return _0x333dx8[_0x5267[17]](404)};if(_0x333dxf[_0x5267[33]]> 0){return _0x333dx8[_0x5267[11]](500)[_0x5267[10]]({message:_0x5267[29]})};if(_0x333dx7[_0x5267[23]][_0x5267[18]]){delete _0x333dx7[_0x5267[23]][_0x5267[18]]};return VoiceContext[_0x5267[20]](_0x333dx7[_0x5267[19]][_0x5267[18]])})[_0x5267[12]](function(_0x333dxc){if(!_0x333dxc){return _0x333dx8[_0x5267[17]](404)};var _0x333dxe=_[_0x5267[31]](_0x333dxc,_0x333dx7[_0x5267[23]]);return _0x333dxe[_0x5267[32]]()})[_0x5267[12]](function(_0x333dxc){return _0x333dx8[_0x5267[11]](200)[_0x5267[10]](_0x333dxc)})[_0x5267[9]](function(_0x333dxa){return handleError(_0x333dx8,_0x333dxa)})};exports[_0x5267[34]]= function(_0x333dx7,_0x333dx8){var _0x333dx10;return VoiceContext[_0x5267[20]](_0x333dx7[_0x5267[19]][_0x5267[18]])[_0x5267[12]](function(_0x333dxc){_0x333dx10= _0x333dxc;if(!_0x333dx10){return _0x333dx8[_0x5267[17]](404)};if(_0x333dx10[_0x5267[39]]){return _0x333dx8[_0x5267[11]](500)[_0x5267[10]]({message:_0x5267[40],translatedMessage:_0x5267[41]})};return VoiceExtension[_0x5267[24]]({where:{context:_0x333dx10[_0x5267[22]],VoiceContextId:null}})})[_0x5267[12]](function(_0x333dx11){console[_0x5267[36]](_0x333dx11);if(_0x333dx11[_0x5267[33]]> 0){return _0x333dx8[_0x5267[11]](500)[_0x5267[10]]({message:_0x5267[37],translatedMessage:_0x5267[38]})};return _0x333dx10[_0x5267[34]]()})[_0x5267[12]](function(){return _0x333dx8[_0x5267[17]](204)})[_0x5267[9]](function(_0x333dxa){console[_0x5267[36]](_0x5267[35],_0x333dxa);return handleError(_0x333dx8,_0x333dxa)})};exports[_0x5267[42]]= function(_0x333dx7,_0x333dx8){var _0x333dx12;return VoiceContext[_0x5267[24]]({where:{id:_0x333dx7[_0x5267[13]][_0x5267[43]]}})[_0x5267[12]](function(_0x333dxd){_0x333dx12= _0x333dxd;var _0x333dx13=_[_0x5267[44]](_0x333dx12,{defaultEntry:true});if(_0x333dx13){return _0x333dx8[_0x5267[11]](500)[_0x5267[10]]({message:_0x5267[40],translatedMessage:_0x5267[41]})};if(!_0x333dx12){return _0x333dx8[_0x5267[17]](404)};var _0x333dx14=_[_0x5267[46]](_[_0x5267[46]](_0x333dx12,_0x5267[45]),_0x5267[22]);return VoiceExtension[_0x5267[24]]({where:{context:_0x333dx14,VoiceContextId:null}})})[_0x5267[12]](function(_0x333dx11){if(_0x333dx11[_0x5267[33]]> _0x333dx12[_0x5267[33]]){return _0x333dx8[_0x5267[11]](500)[_0x5267[10]]({message:_0x5267[37],translatedMessage:_0x5267[38]})};return VoiceContext[_0x5267[34]]({where:{id:_0x333dx7[_0x5267[13]][_0x5267[43]]},individualHooks:true})})[_0x5267[12]](function(){return _0x333dx8[_0x5267[17]](204)})[_0x5267[9]](function(_0x333dxa){console[_0x5267[36]](_0x333dxa);return handleError(_0x333dx8,_0x333dxa)})};function handleError(_0x333dx8,_0x333dxa){return _0x333dx8[_0x5267[11]](500)[_0x5267[10]](_0x333dxa)}
\ No newline at end of file