Built motion from commit dec9cf4.|0.0.134
[motion.git] / server / api / voice_context / voice_context.controller.js
index c244b80..4c4a624 100644 (file)
@@ -1 +1 @@
-var _0xbc9e=["\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","\x6C\x65\x6E\x67\x74\x68","\x4D\x45\x53\x53\x41\x47\x45\x5F\x45\x58\x49\x53\x54\x5F\x52\x4F\x55\x54\x45","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x72\x72","\x6C\x6F\x67","\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","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x6D\x61\x70"];_0xbc9e[0];var _=require(_0xbc9e[1]);var util=require(_0xbc9e[2]);var Util=require(_0xbc9e[3]);var sequelize=require(_0xbc9e[5])[_0xbc9e[4]];var VoiceContext=require(_0xbc9e[5])[_0xbc9e[6]];var VoiceExtension=require(_0xbc9e[5])[_0xbc9e[7]];exports[_0xbc9e[8]]=function(_0x1a62x7,_0x1a62x8,_0x1a62x9){return VoiceContext[_0xbc9e[15]](Util[_0xbc9e[14]](_0x1a62x7[_0xbc9e[13]]))[_0xbc9e[12]](function(_0x1a62xb){_0x1a62x8[_0xbc9e[11]](200)[_0xbc9e[10]](_0x1a62xb)})[_0xbc9e[9]](function(_0x1a62xa){return handleError(_0x1a62x8,_0x1a62xa)})};exports[_0xbc9e[16]]=function(_0x1a62x7,_0x1a62x8){return VoiceContext[_0xbc9e[20]](_0x1a62x7[_0xbc9e[19]][_0xbc9e[18]])[_0xbc9e[12]](function(_0x1a62xc){if(!_0x1a62xc){return _0x1a62x8[_0xbc9e[17]](404)};return _0x1a62x8[_0xbc9e[10]](_0x1a62xc)})[_0xbc9e[9]](function(_0x1a62xa){return handleError(_0x1a62x8,_0x1a62xa)})};exports[_0xbc9e[21]]=function(_0x1a62x7,_0x1a62x8){return VoiceContext[_0xbc9e[24]]({where:{name:_0x1a62x7[_0xbc9e[23]][_0xbc9e[22]]}})[_0xbc9e[12]](function(_0x1a62xd){if(!_0x1a62xd){return _0x1a62x8[_0xbc9e[17]](404)};return _0x1a62x8[_0xbc9e[10]](_0x1a62xd)})[_0xbc9e[9]](function(_0x1a62xa){return handleError(_0x1a62x8,_0x1a62xa)})};exports[_0xbc9e[25]]=function(_0x1a62x7,_0x1a62x8){return VoiceContext[_0xbc9e[24]]({where:{name:_0x1a62x7[_0xbc9e[23]][_0xbc9e[22]]}})[_0xbc9e[12]](function(_0x1a62xe){if(!_0x1a62xe){return _0x1a62x8[_0xbc9e[17]](404)};if(_0x1a62xe[_0xbc9e[26]]>0){return _0x1a62x8[_0xbc9e[11]](500)[_0xbc9e[10]]({message:_0xbc9e[27]})};return VoiceContext[_0xbc9e[25]](_0x1a62x7[_0xbc9e[23]],{include:[{model:VoiceExtension}]})})[_0xbc9e[12]](function(_0x1a62xc){return _0x1a62x8[_0xbc9e[11]](201)[_0xbc9e[10]](_0x1a62xc)})[_0xbc9e[9]](function(_0x1a62xa){return handleError(_0x1a62x8,_0x1a62xa)})};exports[_0xbc9e[28]]=function(_0x1a62x7,_0x1a62x8){return VoiceContext[_0xbc9e[24]]({where:{name:_0x1a62x7[_0xbc9e[23]][_0xbc9e[22]],id:{$ne:_0x1a62x7[_0xbc9e[23]][_0xbc9e[18]]}}})[_0xbc9e[12]](function(_0x1a62xe){if(!_0x1a62xe){return _0x1a62x8[_0xbc9e[17]](404)};if(_0x1a62xe[_0xbc9e[26]]>0){return _0x1a62x8[_0xbc9e[11]](500)[_0xbc9e[10]]({message:_0xbc9e[27]})};if(_0x1a62x7[_0xbc9e[23]][_0xbc9e[18]]){delete _0x1a62x7[_0xbc9e[23]][_0xbc9e[18]]};return VoiceContext[_0xbc9e[20]](_0x1a62x7[_0xbc9e[19]][_0xbc9e[18]])})[_0xbc9e[12]](function(_0x1a62xc){if(!_0x1a62xc){return _0x1a62x8[_0xbc9e[17]](404)};var _0x1a62xf=_[_0xbc9e[29]](_0x1a62xc,_0x1a62x7[_0xbc9e[23]]);return _0x1a62xf[_0xbc9e[30]]()})[_0xbc9e[12]](function(_0x1a62xc){return _0x1a62x8[_0xbc9e[11]](200)[_0xbc9e[10]](_0x1a62xc)})[_0xbc9e[9]](function(_0x1a62xa){return handleError(_0x1a62x8,_0x1a62xa)})};exports[_0xbc9e[31]]=function(_0x1a62x7,_0x1a62x8){var _0x1a62x10;return VoiceContext[_0xbc9e[20]](_0x1a62x7[_0xbc9e[19]][_0xbc9e[18]])[_0xbc9e[12]](function(_0x1a62xc){_0x1a62x10=_0x1a62xc;if(!_0x1a62x10){return _0x1a62x8[_0xbc9e[17]](404)};return VoiceExtension[_0xbc9e[24]]({where:{context:_0x1a62x10[_0xbc9e[22]],VoiceContextId:null}})})[_0xbc9e[12]](function(_0x1a62x11){console[_0xbc9e[33]](_0x1a62x11);if(_0x1a62x11[_0xbc9e[26]]>0){return _0x1a62x8[_0xbc9e[11]](500)[_0xbc9e[10]]({message:_0xbc9e[34]})};return _0x1a62x10[_0xbc9e[31]]()})[_0xbc9e[12]](function(){return _0x1a62x8[_0xbc9e[17]](204)})[_0xbc9e[9]](function(_0x1a62xa){console[_0xbc9e[33]](_0xbc9e[32],_0x1a62xa);return handleError(_0x1a62x8,_0x1a62xa)})};exports[_0xbc9e[35]]=function(_0x1a62x7,_0x1a62x8){var _0x1a62x12;return VoiceContext[_0xbc9e[24]]({where:{id:_0x1a62x7[_0xbc9e[13]][_0xbc9e[36]]}})[_0xbc9e[12]](function(_0x1a62xd){_0x1a62x12=_0x1a62xd;if(!_0x1a62x12){return _0x1a62x8[_0xbc9e[17]](404)};var _0x1a62x13=_[_0xbc9e[38]](_[_0xbc9e[38]](_0x1a62x12,_0xbc9e[37]),_0xbc9e[22]);return VoiceExtension[_0xbc9e[24]]({where:{context:_0x1a62x13}})})[_0xbc9e[12]](function(_0x1a62x11){if(_0x1a62x11[_0xbc9e[26]]>_0x1a62x12[_0xbc9e[26]]){return _0x1a62x8[_0xbc9e[11]](500)[_0xbc9e[10]]({message:_0xbc9e[34]})};return VoiceContext[_0xbc9e[31]]({where:{id:_0x1a62x7[_0xbc9e[13]][_0xbc9e[36]]},individualHooks:true})})[_0xbc9e[12]](function(){return _0x1a62x8[_0xbc9e[17]](204)})[_0xbc9e[9]](function(_0x1a62xa){return handleError(_0x1a62x8,_0x1a62xa)})};function handleError(_0x1a62x8,_0x1a62xa){return _0x1a62x8[_0xbc9e[11]](500)[_0xbc9e[10]](_0x1a62xa)}
\ No newline at end of file
+var _0xe8bd=["\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"];_0xe8bd[0];var _=require(_0xe8bd[1]);var util=require(_0xe8bd[2]);var Util=require(_0xe8bd[3]);var sequelize=require(_0xe8bd[5])[_0xe8bd[4]];var VoiceContext=require(_0xe8bd[5])[_0xe8bd[6]];var VoiceExtension=require(_0xe8bd[5])[_0xe8bd[7]];exports[_0xe8bd[8]]= function(_0x7784x7,_0x7784x8,_0x7784x9){return VoiceContext[_0xe8bd[15]](Util[_0xe8bd[14]](_0x7784x7[_0xe8bd[13]]))[_0xe8bd[12]](function(_0x7784xb){_0x7784x8[_0xe8bd[11]](200)[_0xe8bd[10]](_0x7784xb)})[_0xe8bd[9]](function(_0x7784xa){return handleError(_0x7784x8,_0x7784xa)})};exports[_0xe8bd[16]]= function(_0x7784x7,_0x7784x8){return VoiceContext[_0xe8bd[20]](_0x7784x7[_0xe8bd[19]][_0xe8bd[18]])[_0xe8bd[12]](function(_0x7784xc){if(!_0x7784xc){return _0x7784x8[_0xe8bd[17]](404)};return _0x7784x8[_0xe8bd[10]](_0x7784xc)})[_0xe8bd[9]](function(_0x7784xa){return handleError(_0x7784x8,_0x7784xa)})};exports[_0xe8bd[21]]= function(_0x7784x7,_0x7784x8){return VoiceContext[_0xe8bd[24]]({where:{name:_0x7784x7[_0xe8bd[23]][_0xe8bd[22]]}})[_0xe8bd[12]](function(_0x7784xd){if(!_0x7784xd){return _0x7784x8[_0xe8bd[17]](404)};return _0x7784x8[_0xe8bd[10]](_0x7784xd)})[_0xe8bd[9]](function(_0x7784xa){return handleError(_0x7784x8,_0x7784xa)})};exports[_0xe8bd[25]]= function(_0x7784x7,_0x7784x8){return VoiceContext[_0xe8bd[25]](_0x7784x7[_0xe8bd[23]])[_0xe8bd[12]](function(_0x7784xc){return _0x7784x8[_0xe8bd[11]](201)[_0xe8bd[10]](_0x7784xc)})[_0xe8bd[9]](sequelize.UniqueConstraintError,function(_0x7784xa){_0x7784xa[_0xe8bd[26]]= _0xe8bd[27];_0x7784xa[_0xe8bd[28]]= _0xe8bd[29];return handleError(_0x7784x8,_0x7784xa)})[_0xe8bd[9]](function(_0x7784xa){return handleError(_0x7784x8,_0x7784xa)})};exports[_0xe8bd[30]]= function(_0x7784x7,_0x7784x8){return VoiceContext[_0xe8bd[24]]({where:{name:_0x7784x7[_0xe8bd[23]][_0xe8bd[22]],id:{$ne:_0x7784x7[_0xe8bd[23]][_0xe8bd[18]]}}})[_0xe8bd[12]](function(_0x7784xf){if(!_0x7784xf){return _0x7784x8[_0xe8bd[17]](404)};if(_0x7784xf[_0xe8bd[33]]> 0){return _0x7784x8[_0xe8bd[11]](500)[_0xe8bd[10]]({message:_0xe8bd[29]})};if(_0x7784x7[_0xe8bd[23]][_0xe8bd[18]]){delete _0x7784x7[_0xe8bd[23]][_0xe8bd[18]]};return VoiceContext[_0xe8bd[20]](_0x7784x7[_0xe8bd[19]][_0xe8bd[18]])})[_0xe8bd[12]](function(_0x7784xc){if(!_0x7784xc){return _0x7784x8[_0xe8bd[17]](404)};var _0x7784xe=_[_0xe8bd[31]](_0x7784xc,_0x7784x7[_0xe8bd[23]]);return _0x7784xe[_0xe8bd[32]]()})[_0xe8bd[12]](function(_0x7784xc){return _0x7784x8[_0xe8bd[11]](200)[_0xe8bd[10]](_0x7784xc)})[_0xe8bd[9]](function(_0x7784xa){return handleError(_0x7784x8,_0x7784xa)})};exports[_0xe8bd[34]]= function(_0x7784x7,_0x7784x8){var _0x7784x10;return VoiceContext[_0xe8bd[20]](_0x7784x7[_0xe8bd[19]][_0xe8bd[18]])[_0xe8bd[12]](function(_0x7784xc){_0x7784x10= _0x7784xc;if(!_0x7784x10){return _0x7784x8[_0xe8bd[17]](404)};if(_0x7784x10[_0xe8bd[39]]){return _0x7784x8[_0xe8bd[11]](500)[_0xe8bd[10]]({message:_0xe8bd[40],translatedMessage:_0xe8bd[41]})};return VoiceExtension[_0xe8bd[24]]({where:{context:_0x7784x10[_0xe8bd[22]],VoiceContextId:null}})})[_0xe8bd[12]](function(_0x7784x11){console[_0xe8bd[36]](_0x7784x11);if(_0x7784x11[_0xe8bd[33]]> 0){return _0x7784x8[_0xe8bd[11]](500)[_0xe8bd[10]]({message:_0xe8bd[37],translatedMessage:_0xe8bd[38]})};return _0x7784x10[_0xe8bd[34]]()})[_0xe8bd[12]](function(){return _0x7784x8[_0xe8bd[17]](204)})[_0xe8bd[9]](function(_0x7784xa){console[_0xe8bd[36]](_0xe8bd[35],_0x7784xa);return handleError(_0x7784x8,_0x7784xa)})};exports[_0xe8bd[42]]= function(_0x7784x7,_0x7784x8){var _0x7784x12;return VoiceContext[_0xe8bd[24]]({where:{id:_0x7784x7[_0xe8bd[13]][_0xe8bd[43]]}})[_0xe8bd[12]](function(_0x7784xd){_0x7784x12= _0x7784xd;var _0x7784x13=_[_0xe8bd[44]](_0x7784x12,{defaultEntry:true});if(_0x7784x13){return _0x7784x8[_0xe8bd[11]](500)[_0xe8bd[10]]({message:_0xe8bd[40],translatedMessage:_0xe8bd[41]})};if(!_0x7784x12){return _0x7784x8[_0xe8bd[17]](404)};var _0x7784x14=_[_0xe8bd[46]](_[_0xe8bd[46]](_0x7784x12,_0xe8bd[45]),_0xe8bd[22]);return VoiceExtension[_0xe8bd[24]]({where:{context:_0x7784x14,VoiceContextId:null}})})[_0xe8bd[12]](function(_0x7784x11){if(_0x7784x11[_0xe8bd[33]]> _0x7784x12[_0xe8bd[33]]){return _0x7784x8[_0xe8bd[11]](500)[_0xe8bd[10]]({message:_0xe8bd[37],translatedMessage:_0xe8bd[38]})};return VoiceContext[_0xe8bd[34]]({where:{id:_0x7784x7[_0xe8bd[13]][_0xe8bd[43]]},individualHooks:true})})[_0xe8bd[12]](function(){return _0x7784x8[_0xe8bd[17]](204)})[_0xe8bd[9]](function(_0x7784xa){console[_0xe8bd[36]](_0x7784xa);return handleError(_0x7784x8,_0x7784xa)})};function handleError(_0x7784x8,_0x7784xa){return _0x7784x8[_0xe8bd[11]](500)[_0xe8bd[10]](_0x7784xa)}
\ No newline at end of file