Built motion from commit 0ad9c269e.|1.0.31
[motion.git] / server / api / voice_context / voice_context.controller.js
index 09d7db7..18800e0 100644 (file)
@@ -1 +1 @@
-var _0xedae=["\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"];_0xedae[0];var _=require(_0xedae[1]);var util=require(_0xedae[2]);var Util=require(_0xedae[3]);var sequelize=require(_0xedae[5])[_0xedae[4]];var VoiceContext=require(_0xedae[5])[_0xedae[6]];var VoiceExtension=require(_0xedae[5])[_0xedae[7]];exports[_0xedae[8]]=function(_0xba75x7,_0xba75x8,_0xba75x9){return VoiceContext[_0xedae[15]](Util[_0xedae[14]](_0xba75x7[_0xedae[13]]))[_0xedae[12]](function(_0xba75xb){_0xba75x8[_0xedae[11]](200)[_0xedae[10]](_0xba75xb)})[_0xedae[9]](function(_0xba75xa){return handleError(_0xba75x8,_0xba75xa)})};exports[_0xedae[16]]=function(_0xba75x7,_0xba75x8){return VoiceContext[_0xedae[20]](_0xba75x7[_0xedae[19]][_0xedae[18]])[_0xedae[12]](function(_0xba75xc){if(!_0xba75xc){return _0xba75x8[_0xedae[17]](404)};return _0xba75x8[_0xedae[10]](_0xba75xc)})[_0xedae[9]](function(_0xba75xa){return handleError(_0xba75x8,_0xba75xa)})};exports[_0xedae[21]]=function(_0xba75x7,_0xba75x8){return VoiceContext[_0xedae[24]]({where:{name:_0xba75x7[_0xedae[23]][_0xedae[22]]}})[_0xedae[12]](function(_0xba75xd){if(!_0xba75xd){return _0xba75x8[_0xedae[17]](404)};return _0xba75x8[_0xedae[10]](_0xba75xd)})[_0xedae[9]](function(_0xba75xa){return handleError(_0xba75x8,_0xba75xa)})};exports[_0xedae[25]]=function(_0xba75x7,_0xba75x8){return VoiceContext[_0xedae[25]](_0xba75x7[_0xedae[23]])[_0xedae[12]](function(_0xba75xc){return _0xba75x8[_0xedae[11]](201)[_0xedae[10]](_0xba75xc)})[_0xedae[9]](sequelize.UniqueConstraintError,function(_0xba75xa){_0xba75xa[_0xedae[26]]=_0xedae[27];_0xba75xa[_0xedae[28]]=_0xedae[29];return handleError(_0xba75x8,_0xba75xa)})[_0xedae[9]](function(_0xba75xa){return handleError(_0xba75x8,_0xba75xa)})};exports[_0xedae[30]]=function(_0xba75x7,_0xba75x8){return VoiceContext[_0xedae[24]]({where:{name:_0xba75x7[_0xedae[23]][_0xedae[22]],id:{$ne:_0xba75x7[_0xedae[23]][_0xedae[18]]}}})[_0xedae[12]](function(_0xba75xf){if(!_0xba75xf){return _0xba75x8[_0xedae[17]](404)};if(_0xba75xf[_0xedae[33]]>0){return _0xba75x8[_0xedae[11]](500)[_0xedae[10]]({message:_0xedae[29]})};if(_0xba75x7[_0xedae[23]][_0xedae[18]]){delete _0xba75x7[_0xedae[23]][_0xedae[18]]};return VoiceContext[_0xedae[20]](_0xba75x7[_0xedae[19]][_0xedae[18]])})[_0xedae[12]](function(_0xba75xc){if(!_0xba75xc){return _0xba75x8[_0xedae[17]](404)};var _0xba75xe=_[_0xedae[31]](_0xba75xc,_0xba75x7[_0xedae[23]]);return _0xba75xe[_0xedae[32]]()})[_0xedae[12]](function(_0xba75xc){return _0xba75x8[_0xedae[11]](200)[_0xedae[10]](_0xba75xc)})[_0xedae[9]](function(_0xba75xa){return handleError(_0xba75x8,_0xba75xa)})};exports[_0xedae[34]]=function(_0xba75x7,_0xba75x8){var _0xba75x10;return VoiceContext[_0xedae[20]](_0xba75x7[_0xedae[19]][_0xedae[18]])[_0xedae[12]](function(_0xba75xc){_0xba75x10=_0xba75xc;if(!_0xba75x10){return _0xba75x8[_0xedae[17]](404)};if(_0xba75x10[_0xedae[39]]){return _0xba75x8[_0xedae[11]](500)[_0xedae[10]]({message:_0xedae[40],translatedMessage:_0xedae[41]})};return VoiceExtension[_0xedae[24]]({where:{context:_0xba75x10[_0xedae[22]],VoiceContextId:null}})})[_0xedae[12]](function(_0xba75x11){console[_0xedae[36]](_0xba75x11);if(_0xba75x11[_0xedae[33]]>0){return _0xba75x8[_0xedae[11]](500)[_0xedae[10]]({message:_0xedae[37],translatedMessage:_0xedae[38]})};return _0xba75x10[_0xedae[34]]()})[_0xedae[12]](function(){return _0xba75x8[_0xedae[17]](204)})[_0xedae[9]](function(_0xba75xa){console[_0xedae[36]](_0xedae[35],_0xba75xa);return handleError(_0xba75x8,_0xba75xa)})};exports[_0xedae[42]]=function(_0xba75x7,_0xba75x8){var _0xba75x12;return VoiceContext[_0xedae[24]]({where:{id:_0xba75x7[_0xedae[13]][_0xedae[43]]}})[_0xedae[12]](function(_0xba75xd){_0xba75x12=_0xba75xd;var _0xba75x13=_[_0xedae[44]](_0xba75x12,{defaultEntry:true});if(_0xba75x13){return _0xba75x8[_0xedae[11]](500)[_0xedae[10]]({message:_0xedae[40],translatedMessage:_0xedae[41]})};if(!_0xba75x12){return _0xba75x8[_0xedae[17]](404)};var _0xba75x14=_[_0xedae[46]](_[_0xedae[46]](_0xba75x12,_0xedae[45]),_0xedae[22]);return VoiceExtension[_0xedae[24]]({where:{context:_0xba75x14,VoiceContextId:null}})})[_0xedae[12]](function(_0xba75x11){if(_0xba75x11[_0xedae[33]]>_0xba75x12[_0xedae[33]]){return _0xba75x8[_0xedae[11]](500)[_0xedae[10]]({message:_0xedae[37],translatedMessage:_0xedae[38]})};return VoiceContext[_0xedae[34]]({where:{id:_0xba75x7[_0xedae[13]][_0xedae[43]]},individualHooks:true})})[_0xedae[12]](function(){return _0xba75x8[_0xedae[17]](204)})[_0xedae[9]](function(_0xba75xa){console[_0xedae[36]](_0xba75xa);return handleError(_0xba75x8,_0xba75xa)})};function handleError(_0xba75x8,_0xba75xa){return _0xba75x8[_0xedae[11]](500)[_0xedae[10]](_0xba75xa)}
\ No newline at end of file
+var _0x606b=["\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"];_0x606b[0];var _=require(_0x606b[1]);var util=require(_0x606b[2]);var logger=require(_0x606b[4])(_0x606b[3]);var Util=require(_0x606b[5]);var sequelize=require(_0x606b[7])[_0x606b[6]];var VoiceContext=require(_0x606b[7])[_0x606b[8]];var VoiceExtension=require(_0x606b[7])[_0x606b[9]];exports[_0x606b[10]]= function(_0x60cfx8,_0x60cfx9,_0x60cfxa){return VoiceContext[_0x606b[17]](Util[_0x606b[16]](_0x60cfx8[_0x606b[15]]))[_0x606b[14]](function(_0x60cfxc){_0x60cfx9[_0x606b[13]](200)[_0x606b[12]](_0x60cfxc)})[_0x606b[11]](function(_0x60cfxb){return handleError(_0x60cfx9,_0x60cfxb)})};exports[_0x606b[18]]= function(_0x60cfx8,_0x60cfx9){return VoiceContext[_0x606b[22]](_0x60cfx8[_0x606b[21]][_0x606b[20]])[_0x606b[14]](function(_0x60cfxd){if(!_0x60cfxd){return _0x60cfx9[_0x606b[19]](404)};return _0x60cfx9[_0x606b[12]](_0x60cfxd)})[_0x606b[11]](function(_0x60cfxb){return handleError(_0x60cfx9,_0x60cfxb)})};exports[_0x606b[23]]= function(_0x60cfx8,_0x60cfx9){return VoiceContext[_0x606b[26]]({where:{name:_0x60cfx8[_0x606b[25]][_0x606b[24]]}})[_0x606b[14]](function(_0x60cfxe){if(!_0x60cfxe){return _0x60cfx9[_0x606b[19]](404)};return _0x60cfx9[_0x606b[12]](_0x60cfxe)})[_0x606b[11]](function(_0x60cfxb){return handleError(_0x60cfx9,_0x60cfxb)})};exports[_0x606b[27]]= function(_0x60cfx8,_0x60cfx9){return VoiceContext[_0x606b[27]](_0x60cfx8[_0x606b[25]])[_0x606b[14]](function(_0x60cfxd){return _0x60cfx9[_0x606b[13]](201)[_0x606b[12]](_0x60cfxd)})[_0x606b[11]](sequelize.UniqueConstraintError,function(_0x60cfxb){_0x60cfxb[_0x606b[28]]= _0x606b[29];_0x60cfxb[_0x606b[30]]= _0x606b[31];return handleError(_0x60cfx9,_0x60cfxb)})[_0x606b[11]](function(_0x60cfxb){return handleError(_0x60cfx9,_0x60cfxb)})};exports[_0x606b[32]]= function(_0x60cfx8,_0x60cfx9){return VoiceContext[_0x606b[26]]({where:{name:_0x60cfx8[_0x606b[25]][_0x606b[24]],id:{$ne:_0x60cfx8[_0x606b[25]][_0x606b[20]]}}})[_0x606b[14]](function(_0x60cfx10){if(!_0x60cfx10){return _0x60cfx9[_0x606b[19]](404)};if(_0x60cfx10[_0x606b[35]]> 0){return _0x60cfx9[_0x606b[13]](500)[_0x606b[12]]({message:_0x606b[31]})};if(_0x60cfx8[_0x606b[25]][_0x606b[20]]){delete _0x60cfx8[_0x606b[25]][_0x606b[20]]};return VoiceContext[_0x606b[22]](_0x60cfx8[_0x606b[21]][_0x606b[20]])})[_0x606b[14]](function(_0x60cfxd){if(!_0x60cfxd){return _0x60cfx9[_0x606b[19]](404)};var _0x60cfxf=_[_0x606b[33]](_0x60cfxd,_0x60cfx8[_0x606b[25]]);return _0x60cfxf[_0x606b[34]]()})[_0x606b[14]](function(_0x60cfxd){return _0x60cfx9[_0x606b[13]](200)[_0x606b[12]](_0x60cfxd)})[_0x606b[11]](function(_0x60cfxb){return handleError(_0x60cfx9,_0x60cfxb)})};exports[_0x606b[36]]= function(_0x60cfx8,_0x60cfx9){var _0x60cfx11;return VoiceContext[_0x606b[22]](_0x60cfx8[_0x606b[21]][_0x606b[20]])[_0x606b[14]](function(_0x60cfxd){_0x60cfx11= _0x60cfxd;if(!_0x60cfx11){return _0x60cfx9[_0x606b[19]](404)};if(_0x60cfx11[_0x606b[39]]){return _0x60cfx9[_0x606b[13]](500)[_0x606b[12]]({message:_0x606b[40],translatedMessage:_0x606b[41]})};return VoiceExtension[_0x606b[26]]({where:{context:_0x60cfx11[_0x606b[24]],VoiceContextId:null}})})[_0x606b[14]](function(_0x60cfx12){if(_0x60cfx12[_0x606b[35]]> 0){return _0x60cfx9[_0x606b[13]](500)[_0x606b[12]]({message:_0x606b[37],translatedMessage:_0x606b[38]})};return _0x60cfx11[_0x606b[36]]()})[_0x606b[14]](function(){return _0x60cfx9[_0x606b[19]](204)})[_0x606b[11]](function(_0x60cfxb){return handleError(_0x60cfx9,_0x60cfxb)})};exports[_0x606b[42]]= function(_0x60cfx8,_0x60cfx9){var _0x60cfx13;return VoiceContext[_0x606b[26]]({where:{id:_0x60cfx8[_0x606b[15]][_0x606b[43]]}})[_0x606b[14]](function(_0x60cfxe){_0x60cfx13= _0x60cfxe;var _0x60cfx14=_[_0x606b[44]](_0x60cfx13,{defaultEntry:true});if(_0x60cfx14){return _0x60cfx9[_0x606b[13]](500)[_0x606b[12]]({message:_0x606b[40],translatedMessage:_0x606b[41]})};if(!_0x60cfx13){return _0x60cfx9[_0x606b[19]](404)};var _0x60cfx15=_[_0x606b[46]](_[_0x606b[46]](_0x60cfx13,_0x606b[45]),_0x606b[24]);return VoiceExtension[_0x606b[26]]({where:{context:_0x60cfx15,VoiceContextId:null}})})[_0x606b[14]](function(_0x60cfx12){if(_0x60cfx12[_0x606b[35]]> _0x60cfx13[_0x606b[35]]){return _0x60cfx9[_0x606b[13]](500)[_0x606b[12]]({message:_0x606b[37],translatedMessage:_0x606b[38]})};return VoiceContext[_0x606b[36]]({where:{id:_0x60cfx8[_0x606b[15]][_0x606b[43]]},individualHooks:true})})[_0x606b[14]](function(){return _0x60cfx9[_0x606b[19]](204)})[_0x606b[11]](function(_0x60cfxb){return handleError(_0x60cfx9,_0x60cfxb)})};function handleError(_0x60cfx9,_0x60cfxb){logger[_0x606b[48]](_0x60cfxb[_0x606b[47]]);return _0x60cfx9[_0x606b[13]](500)[_0x606b[12]](_0x60cfxb)}
\ No newline at end of file