Built motion from commit 1333b3551.|1.0.38
[motion.git] / server / api / voice_context / voice_context.controller.js
index 8794f92..353b907 100644 (file)
@@ -1 +1 @@
-var _0x972f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\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","\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","\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","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72"];_0x972f[0];var _=require(_0x972f[1]);var util=require(_0x972f[2]);var logger=require(_0x972f[4])(_0x972f[3]);var Util=require(_0x972f[5]);var sequelize=require(_0x972f[7])[_0x972f[6]];var VoiceContext=require(_0x972f[7])[_0x972f[8]];var VoiceExtension=require(_0x972f[7])[_0x972f[9]];exports[_0x972f[10]]= function(_0x4447x8,_0x4447x9,_0x4447xa){return VoiceContext[_0x972f[17]](Util[_0x972f[16]](_0x4447x8[_0x972f[15]]))[_0x972f[14]](function(_0x4447xc){_0x4447x9[_0x972f[13]](200)[_0x972f[12]](_0x4447xc)})[_0x972f[11]](function(_0x4447xb){return handleError(_0x4447x9,_0x4447xb)})};exports[_0x972f[18]]= function(_0x4447x8,_0x4447x9){return VoiceContext[_0x972f[22]](_0x4447x8[_0x972f[21]][_0x972f[20]])[_0x972f[14]](function(_0x4447xd){if(!_0x4447xd){return _0x4447x9[_0x972f[19]](404)};return _0x4447x9[_0x972f[12]](_0x4447xd)})[_0x972f[11]](function(_0x4447xb){return handleError(_0x4447x9,_0x4447xb)})};exports[_0x972f[23]]= function(_0x4447x8,_0x4447x9){return VoiceContext[_0x972f[26]]({where:{name:_0x4447x8[_0x972f[25]][_0x972f[24]]}})[_0x972f[14]](function(_0x4447xe){if(!_0x4447xe){return _0x4447x9[_0x972f[19]](404)};return _0x4447x9[_0x972f[12]](_0x4447xe)})[_0x972f[11]](function(_0x4447xb){return handleError(_0x4447x9,_0x4447xb)})};exports[_0x972f[27]]= function(_0x4447x8,_0x4447x9){return VoiceContext[_0x972f[27]](_0x4447x8[_0x972f[25]])[_0x972f[14]](function(_0x4447xd){return _0x4447x9[_0x972f[13]](201)[_0x972f[12]](_0x4447xd)})[_0x972f[11]](sequelize.UniqueConstraintError,function(_0x4447xb){_0x4447xb[_0x972f[28]]= _0x972f[29];_0x4447xb[_0x972f[30]]= _0x972f[31];return handleError(_0x4447x9,_0x4447xb)})[_0x972f[11]](function(_0x4447xb){return handleError(_0x4447x9,_0x4447xb)})};exports[_0x972f[32]]= function(_0x4447x8,_0x4447x9){return VoiceContext[_0x972f[26]]({where:{name:_0x4447x8[_0x972f[25]][_0x972f[24]],id:{$ne:_0x4447x8[_0x972f[25]][_0x972f[20]]}}})[_0x972f[14]](function(_0x4447x10){if(!_0x4447x10){return _0x4447x9[_0x972f[19]](404)};if(_0x4447x10[_0x972f[35]]> 0){return _0x4447x9[_0x972f[13]](500)[_0x972f[12]]({message:_0x972f[31]})};if(_0x4447x8[_0x972f[25]][_0x972f[20]]){delete _0x4447x8[_0x972f[25]][_0x972f[20]]};return VoiceContext[_0x972f[22]](_0x4447x8[_0x972f[21]][_0x972f[20]])})[_0x972f[14]](function(_0x4447xd){if(!_0x4447xd){return _0x4447x9[_0x972f[19]](404)};var _0x4447xf=_[_0x972f[33]](_0x4447xd,_0x4447x8[_0x972f[25]]);return _0x4447xf[_0x972f[34]]()})[_0x972f[14]](function(_0x4447xd){return _0x4447x9[_0x972f[13]](200)[_0x972f[12]](_0x4447xd)})[_0x972f[11]](function(_0x4447xb){return handleError(_0x4447x9,_0x4447xb)})};exports[_0x972f[36]]= function(_0x4447x8,_0x4447x9){var _0x4447x11;return VoiceContext[_0x972f[22]](_0x4447x8[_0x972f[21]][_0x972f[20]])[_0x972f[14]](function(_0x4447xd){_0x4447x11= _0x4447xd;if(!_0x4447x11){return _0x4447x9[_0x972f[19]](404)};if(_0x4447x11[_0x972f[39]]){return _0x4447x9[_0x972f[13]](500)[_0x972f[12]]({message:_0x972f[40],translatedMessage:_0x972f[41]})};return VoiceExtension[_0x972f[26]]({where:{context:_0x4447x11[_0x972f[24]],VoiceContextId:null}})})[_0x972f[14]](function(_0x4447x12){if(_0x4447x12[_0x972f[35]]> 0){return _0x4447x9[_0x972f[13]](500)[_0x972f[12]]({message:_0x972f[37],translatedMessage:_0x972f[38]})};return _0x4447x11[_0x972f[36]]()})[_0x972f[14]](function(){return _0x4447x9[_0x972f[19]](204)})[_0x972f[11]](function(_0x4447xb){return handleError(_0x4447x9,_0x4447xb)})};exports[_0x972f[42]]= function(_0x4447x8,_0x4447x9){var _0x4447x13;return VoiceContext[_0x972f[26]]({where:{id:_0x4447x8[_0x972f[15]][_0x972f[43]]}})[_0x972f[14]](function(_0x4447xe){_0x4447x13= _0x4447xe;var _0x4447x14=_[_0x972f[44]](_0x4447x13,{defaultEntry:true});if(_0x4447x14){return _0x4447x9[_0x972f[13]](500)[_0x972f[12]]({message:_0x972f[40],translatedMessage:_0x972f[41]})};if(!_0x4447x13){return _0x4447x9[_0x972f[19]](404)};var _0x4447x15=_[_0x972f[46]](_[_0x972f[46]](_0x4447x13,_0x972f[45]),_0x972f[24]);return VoiceExtension[_0x972f[26]]({where:{context:_0x4447x15,VoiceContextId:null}})})[_0x972f[14]](function(_0x4447x12){if(_0x4447x12[_0x972f[35]]> _0x4447x13[_0x972f[35]]){return _0x4447x9[_0x972f[13]](500)[_0x972f[12]]({message:_0x972f[37],translatedMessage:_0x972f[38]})};return VoiceContext[_0x972f[36]]({where:{id:_0x4447x8[_0x972f[15]][_0x972f[43]]},individualHooks:true})})[_0x972f[14]](function(){return _0x4447x9[_0x972f[19]](204)})[_0x972f[11]](function(_0x4447xb){return handleError(_0x4447x9,_0x4447xb)})};function handleError(_0x4447x9,_0x4447xb){logger[_0x972f[48]](_0x4447xb[_0x972f[47]]);return _0x4447x9[_0x972f[13]](500)[_0x972f[12]](_0x4447xb)}
\ No newline at end of file
+var _0x7ee5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\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","\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","\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","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72"];_0x7ee5[0];var _=require(_0x7ee5[1]);var util=require(_0x7ee5[2]);var logger=require(_0x7ee5[4])(_0x7ee5[3]);var Util=require(_0x7ee5[5]);var sequelize=require(_0x7ee5[7])[_0x7ee5[6]];var VoiceContext=require(_0x7ee5[7])[_0x7ee5[8]];var VoiceExtension=require(_0x7ee5[7])[_0x7ee5[9]];exports[_0x7ee5[10]]= function(_0x9e71x8,_0x9e71x9,_0x9e71xa){return VoiceContext[_0x7ee5[17]](Util[_0x7ee5[16]](_0x9e71x8[_0x7ee5[15]]))[_0x7ee5[14]](function(_0x9e71xc){_0x9e71x9[_0x7ee5[13]](200)[_0x7ee5[12]](_0x9e71xc)})[_0x7ee5[11]](function(_0x9e71xb){return handleError(_0x9e71x9,_0x9e71xb)})};exports[_0x7ee5[18]]= function(_0x9e71x8,_0x9e71x9){return VoiceContext[_0x7ee5[22]](_0x9e71x8[_0x7ee5[21]][_0x7ee5[20]])[_0x7ee5[14]](function(_0x9e71xd){if(!_0x9e71xd){return _0x9e71x9[_0x7ee5[19]](404)};return _0x9e71x9[_0x7ee5[12]](_0x9e71xd)})[_0x7ee5[11]](function(_0x9e71xb){return handleError(_0x9e71x9,_0x9e71xb)})};exports[_0x7ee5[23]]= function(_0x9e71x8,_0x9e71x9){return VoiceContext[_0x7ee5[26]]({where:{name:_0x9e71x8[_0x7ee5[25]][_0x7ee5[24]]}})[_0x7ee5[14]](function(_0x9e71xe){if(!_0x9e71xe){return _0x9e71x9[_0x7ee5[19]](404)};return _0x9e71x9[_0x7ee5[12]](_0x9e71xe)})[_0x7ee5[11]](function(_0x9e71xb){return handleError(_0x9e71x9,_0x9e71xb)})};exports[_0x7ee5[27]]= function(_0x9e71x8,_0x9e71x9){return VoiceContext[_0x7ee5[27]](_0x9e71x8[_0x7ee5[25]])[_0x7ee5[14]](function(_0x9e71xd){return _0x9e71x9[_0x7ee5[13]](201)[_0x7ee5[12]](_0x9e71xd)})[_0x7ee5[11]](sequelize.UniqueConstraintError,function(_0x9e71xb){_0x9e71xb[_0x7ee5[28]]= _0x7ee5[29];_0x9e71xb[_0x7ee5[30]]= _0x7ee5[31];return handleError(_0x9e71x9,_0x9e71xb)})[_0x7ee5[11]](function(_0x9e71xb){return handleError(_0x9e71x9,_0x9e71xb)})};exports[_0x7ee5[32]]= function(_0x9e71x8,_0x9e71x9){return VoiceContext[_0x7ee5[26]]({where:{name:_0x9e71x8[_0x7ee5[25]][_0x7ee5[24]],id:{$ne:_0x9e71x8[_0x7ee5[25]][_0x7ee5[20]]}}})[_0x7ee5[14]](function(_0x9e71x10){if(!_0x9e71x10){return _0x9e71x9[_0x7ee5[19]](404)};if(_0x9e71x10[_0x7ee5[35]]> 0){return _0x9e71x9[_0x7ee5[13]](500)[_0x7ee5[12]]({message:_0x7ee5[31]})};if(_0x9e71x8[_0x7ee5[25]][_0x7ee5[20]]){delete _0x9e71x8[_0x7ee5[25]][_0x7ee5[20]]};return VoiceContext[_0x7ee5[22]](_0x9e71x8[_0x7ee5[21]][_0x7ee5[20]])})[_0x7ee5[14]](function(_0x9e71xd){if(!_0x9e71xd){return _0x9e71x9[_0x7ee5[19]](404)};var _0x9e71xf=_[_0x7ee5[33]](_0x9e71xd,_0x9e71x8[_0x7ee5[25]]);return _0x9e71xf[_0x7ee5[34]]()})[_0x7ee5[14]](function(_0x9e71xd){return _0x9e71x9[_0x7ee5[13]](200)[_0x7ee5[12]](_0x9e71xd)})[_0x7ee5[11]](function(_0x9e71xb){return handleError(_0x9e71x9,_0x9e71xb)})};exports[_0x7ee5[36]]= function(_0x9e71x8,_0x9e71x9){var _0x9e71x11;return VoiceContext[_0x7ee5[22]](_0x9e71x8[_0x7ee5[21]][_0x7ee5[20]])[_0x7ee5[14]](function(_0x9e71xd){_0x9e71x11= _0x9e71xd;if(!_0x9e71x11){return _0x9e71x9[_0x7ee5[19]](404)};if(_0x9e71x11[_0x7ee5[39]]){return _0x9e71x9[_0x7ee5[13]](500)[_0x7ee5[12]]({message:_0x7ee5[40],translatedMessage:_0x7ee5[41]})};return VoiceExtension[_0x7ee5[26]]({where:{context:_0x9e71x11[_0x7ee5[24]],VoiceContextId:null}})})[_0x7ee5[14]](function(_0x9e71x12){if(_0x9e71x12[_0x7ee5[35]]> 0){return _0x9e71x9[_0x7ee5[13]](500)[_0x7ee5[12]]({message:_0x7ee5[37],translatedMessage:_0x7ee5[38]})};return _0x9e71x11[_0x7ee5[36]]()})[_0x7ee5[14]](function(){return _0x9e71x9[_0x7ee5[19]](204)})[_0x7ee5[11]](function(_0x9e71xb){return handleError(_0x9e71x9,_0x9e71xb)})};exports[_0x7ee5[42]]= function(_0x9e71x8,_0x9e71x9){var _0x9e71x13;return VoiceContext[_0x7ee5[26]]({where:{id:_0x9e71x8[_0x7ee5[15]][_0x7ee5[43]]}})[_0x7ee5[14]](function(_0x9e71xe){_0x9e71x13= _0x9e71xe;var _0x9e71x14=_[_0x7ee5[44]](_0x9e71x13,{defaultEntry:true});if(_0x9e71x14){return _0x9e71x9[_0x7ee5[13]](500)[_0x7ee5[12]]({message:_0x7ee5[40],translatedMessage:_0x7ee5[41]})};if(!_0x9e71x13){return _0x9e71x9[_0x7ee5[19]](404)};var _0x9e71x15=_[_0x7ee5[46]](_[_0x7ee5[46]](_0x9e71x13,_0x7ee5[45]),_0x7ee5[24]);return VoiceExtension[_0x7ee5[26]]({where:{context:_0x9e71x15,VoiceContextId:null}})})[_0x7ee5[14]](function(_0x9e71x12){if(_0x9e71x12[_0x7ee5[35]]> _0x9e71x13[_0x7ee5[35]]){return _0x9e71x9[_0x7ee5[13]](500)[_0x7ee5[12]]({message:_0x7ee5[37],translatedMessage:_0x7ee5[38]})};return VoiceContext[_0x7ee5[36]]({where:{id:_0x9e71x8[_0x7ee5[15]][_0x7ee5[43]]},individualHooks:true})})[_0x7ee5[14]](function(){return _0x9e71x9[_0x7ee5[19]](204)})[_0x7ee5[11]](function(_0x9e71xb){return handleError(_0x9e71x9,_0x9e71xb)})};function handleError(_0x9e71x9,_0x9e71xb){logger[_0x7ee5[48]](_0x9e71xb[_0x7ee5[47]]);return _0x9e71x9[_0x7ee5[13]](500)[_0x7ee5[12]](_0x9e71xb)}
\ No newline at end of file