Built motion from commit 420f8c692.|1.0.30
[motion.git] / server / api / voice_context / voice_context.controller.js
index e2b3598..4a5c35c 100644 (file)
@@ -1 +1 @@
-var _0x2daa=["\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"];_0x2daa[0];var _=require(_0x2daa[1]);var util=require(_0x2daa[2]);var Util=require(_0x2daa[3]);var sequelize=require(_0x2daa[5])[_0x2daa[4]];var VoiceContext=require(_0x2daa[5])[_0x2daa[6]];var VoiceExtension=require(_0x2daa[5])[_0x2daa[7]];exports[_0x2daa[8]]=function(_0x655cx7,_0x655cx8,_0x655cx9){return VoiceContext[_0x2daa[15]](Util[_0x2daa[14]](_0x655cx7[_0x2daa[13]]))[_0x2daa[12]](function(_0x655cxb){_0x655cx8[_0x2daa[11]](200)[_0x2daa[10]](_0x655cxb)})[_0x2daa[9]](function(_0x655cxa){return handleError(_0x655cx8,_0x655cxa)})};exports[_0x2daa[16]]=function(_0x655cx7,_0x655cx8){return VoiceContext[_0x2daa[20]](_0x655cx7[_0x2daa[19]][_0x2daa[18]])[_0x2daa[12]](function(_0x655cxc){if(!_0x655cxc){return _0x655cx8[_0x2daa[17]](404)};return _0x655cx8[_0x2daa[10]](_0x655cxc)})[_0x2daa[9]](function(_0x655cxa){return handleError(_0x655cx8,_0x655cxa)})};exports[_0x2daa[21]]=function(_0x655cx7,_0x655cx8){return VoiceContext[_0x2daa[24]]({where:{name:_0x655cx7[_0x2daa[23]][_0x2daa[22]]}})[_0x2daa[12]](function(_0x655cxd){if(!_0x655cxd){return _0x655cx8[_0x2daa[17]](404)};return _0x655cx8[_0x2daa[10]](_0x655cxd)})[_0x2daa[9]](function(_0x655cxa){return handleError(_0x655cx8,_0x655cxa)})};exports[_0x2daa[25]]=function(_0x655cx7,_0x655cx8){return VoiceContext[_0x2daa[25]](_0x655cx7[_0x2daa[23]])[_0x2daa[12]](function(_0x655cxc){return _0x655cx8[_0x2daa[11]](201)[_0x2daa[10]](_0x655cxc)})[_0x2daa[9]](sequelize.UniqueConstraintError,function(_0x655cxa){_0x655cxa[_0x2daa[26]]=_0x2daa[27];_0x655cxa[_0x2daa[28]]=_0x2daa[29];return handleError(_0x655cx8,_0x655cxa)})[_0x2daa[9]](function(_0x655cxa){return handleError(_0x655cx8,_0x655cxa)})};exports[_0x2daa[30]]=function(_0x655cx7,_0x655cx8){return VoiceContext[_0x2daa[24]]({where:{name:_0x655cx7[_0x2daa[23]][_0x2daa[22]],id:{$ne:_0x655cx7[_0x2daa[23]][_0x2daa[18]]}}})[_0x2daa[12]](function(_0x655cxf){if(!_0x655cxf){return _0x655cx8[_0x2daa[17]](404)};if(_0x655cxf[_0x2daa[33]]>0){return _0x655cx8[_0x2daa[11]](500)[_0x2daa[10]]({message:_0x2daa[29]})};if(_0x655cx7[_0x2daa[23]][_0x2daa[18]]){delete _0x655cx7[_0x2daa[23]][_0x2daa[18]]};return VoiceContext[_0x2daa[20]](_0x655cx7[_0x2daa[19]][_0x2daa[18]])})[_0x2daa[12]](function(_0x655cxc){if(!_0x655cxc){return _0x655cx8[_0x2daa[17]](404)};var _0x655cxe=_[_0x2daa[31]](_0x655cxc,_0x655cx7[_0x2daa[23]]);return _0x655cxe[_0x2daa[32]]()})[_0x2daa[12]](function(_0x655cxc){return _0x655cx8[_0x2daa[11]](200)[_0x2daa[10]](_0x655cxc)})[_0x2daa[9]](function(_0x655cxa){return handleError(_0x655cx8,_0x655cxa)})};exports[_0x2daa[34]]=function(_0x655cx7,_0x655cx8){var _0x655cx10;return VoiceContext[_0x2daa[20]](_0x655cx7[_0x2daa[19]][_0x2daa[18]])[_0x2daa[12]](function(_0x655cxc){_0x655cx10=_0x655cxc;if(!_0x655cx10){return _0x655cx8[_0x2daa[17]](404)};if(_0x655cx10[_0x2daa[39]]){return _0x655cx8[_0x2daa[11]](500)[_0x2daa[10]]({message:_0x2daa[40],translatedMessage:_0x2daa[41]})};return VoiceExtension[_0x2daa[24]]({where:{context:_0x655cx10[_0x2daa[22]],VoiceContextId:null}})})[_0x2daa[12]](function(_0x655cx11){console[_0x2daa[36]](_0x655cx11);if(_0x655cx11[_0x2daa[33]]>0){return _0x655cx8[_0x2daa[11]](500)[_0x2daa[10]]({message:_0x2daa[37],translatedMessage:_0x2daa[38]})};return _0x655cx10[_0x2daa[34]]()})[_0x2daa[12]](function(){return _0x655cx8[_0x2daa[17]](204)})[_0x2daa[9]](function(_0x655cxa){console[_0x2daa[36]](_0x2daa[35],_0x655cxa);return handleError(_0x655cx8,_0x655cxa)})};exports[_0x2daa[42]]=function(_0x655cx7,_0x655cx8){var _0x655cx12;return VoiceContext[_0x2daa[24]]({where:{id:_0x655cx7[_0x2daa[13]][_0x2daa[43]]}})[_0x2daa[12]](function(_0x655cxd){_0x655cx12=_0x655cxd;var _0x655cx13=_[_0x2daa[44]](_0x655cx12,{defaultEntry:true});if(_0x655cx13){return _0x655cx8[_0x2daa[11]](500)[_0x2daa[10]]({message:_0x2daa[40],translatedMessage:_0x2daa[41]})};if(!_0x655cx12){return _0x655cx8[_0x2daa[17]](404)};var _0x655cx14=_[_0x2daa[46]](_[_0x2daa[46]](_0x655cx12,_0x2daa[45]),_0x2daa[22]);return VoiceExtension[_0x2daa[24]]({where:{context:_0x655cx14,VoiceContextId:null}})})[_0x2daa[12]](function(_0x655cx11){if(_0x655cx11[_0x2daa[33]]>_0x655cx12[_0x2daa[33]]){return _0x655cx8[_0x2daa[11]](500)[_0x2daa[10]]({message:_0x2daa[37],translatedMessage:_0x2daa[38]})};return VoiceContext[_0x2daa[34]]({where:{id:_0x655cx7[_0x2daa[13]][_0x2daa[43]]},individualHooks:true})})[_0x2daa[12]](function(){return _0x655cx8[_0x2daa[17]](204)})[_0x2daa[9]](function(_0x655cxa){console[_0x2daa[36]](_0x655cxa);return handleError(_0x655cx8,_0x655cxa)})};function handleError(_0x655cx8,_0x655cxa){return _0x655cx8[_0x2daa[11]](500)[_0x2daa[10]](_0x655cxa)}
\ No newline at end of file
+var _0x9143=["\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"];_0x9143[0];var _=require(_0x9143[1]);var util=require(_0x9143[2]);var logger=require(_0x9143[4])(_0x9143[3]);var Util=require(_0x9143[5]);var sequelize=require(_0x9143[7])[_0x9143[6]];var VoiceContext=require(_0x9143[7])[_0x9143[8]];var VoiceExtension=require(_0x9143[7])[_0x9143[9]];exports[_0x9143[10]]= function(_0x9787x8,_0x9787x9,_0x9787xa){return VoiceContext[_0x9143[17]](Util[_0x9143[16]](_0x9787x8[_0x9143[15]]))[_0x9143[14]](function(_0x9787xc){_0x9787x9[_0x9143[13]](200)[_0x9143[12]](_0x9787xc)})[_0x9143[11]](function(_0x9787xb){return handleError(_0x9787x9,_0x9787xb)})};exports[_0x9143[18]]= function(_0x9787x8,_0x9787x9){return VoiceContext[_0x9143[22]](_0x9787x8[_0x9143[21]][_0x9143[20]])[_0x9143[14]](function(_0x9787xd){if(!_0x9787xd){return _0x9787x9[_0x9143[19]](404)};return _0x9787x9[_0x9143[12]](_0x9787xd)})[_0x9143[11]](function(_0x9787xb){return handleError(_0x9787x9,_0x9787xb)})};exports[_0x9143[23]]= function(_0x9787x8,_0x9787x9){return VoiceContext[_0x9143[26]]({where:{name:_0x9787x8[_0x9143[25]][_0x9143[24]]}})[_0x9143[14]](function(_0x9787xe){if(!_0x9787xe){return _0x9787x9[_0x9143[19]](404)};return _0x9787x9[_0x9143[12]](_0x9787xe)})[_0x9143[11]](function(_0x9787xb){return handleError(_0x9787x9,_0x9787xb)})};exports[_0x9143[27]]= function(_0x9787x8,_0x9787x9){return VoiceContext[_0x9143[27]](_0x9787x8[_0x9143[25]])[_0x9143[14]](function(_0x9787xd){return _0x9787x9[_0x9143[13]](201)[_0x9143[12]](_0x9787xd)})[_0x9143[11]](sequelize.UniqueConstraintError,function(_0x9787xb){_0x9787xb[_0x9143[28]]= _0x9143[29];_0x9787xb[_0x9143[30]]= _0x9143[31];return handleError(_0x9787x9,_0x9787xb)})[_0x9143[11]](function(_0x9787xb){return handleError(_0x9787x9,_0x9787xb)})};exports[_0x9143[32]]= function(_0x9787x8,_0x9787x9){return VoiceContext[_0x9143[26]]({where:{name:_0x9787x8[_0x9143[25]][_0x9143[24]],id:{$ne:_0x9787x8[_0x9143[25]][_0x9143[20]]}}})[_0x9143[14]](function(_0x9787x10){if(!_0x9787x10){return _0x9787x9[_0x9143[19]](404)};if(_0x9787x10[_0x9143[35]]> 0){return _0x9787x9[_0x9143[13]](500)[_0x9143[12]]({message:_0x9143[31]})};if(_0x9787x8[_0x9143[25]][_0x9143[20]]){delete _0x9787x8[_0x9143[25]][_0x9143[20]]};return VoiceContext[_0x9143[22]](_0x9787x8[_0x9143[21]][_0x9143[20]])})[_0x9143[14]](function(_0x9787xd){if(!_0x9787xd){return _0x9787x9[_0x9143[19]](404)};var _0x9787xf=_[_0x9143[33]](_0x9787xd,_0x9787x8[_0x9143[25]]);return _0x9787xf[_0x9143[34]]()})[_0x9143[14]](function(_0x9787xd){return _0x9787x9[_0x9143[13]](200)[_0x9143[12]](_0x9787xd)})[_0x9143[11]](function(_0x9787xb){return handleError(_0x9787x9,_0x9787xb)})};exports[_0x9143[36]]= function(_0x9787x8,_0x9787x9){var _0x9787x11;return VoiceContext[_0x9143[22]](_0x9787x8[_0x9143[21]][_0x9143[20]])[_0x9143[14]](function(_0x9787xd){_0x9787x11= _0x9787xd;if(!_0x9787x11){return _0x9787x9[_0x9143[19]](404)};if(_0x9787x11[_0x9143[39]]){return _0x9787x9[_0x9143[13]](500)[_0x9143[12]]({message:_0x9143[40],translatedMessage:_0x9143[41]})};return VoiceExtension[_0x9143[26]]({where:{context:_0x9787x11[_0x9143[24]],VoiceContextId:null}})})[_0x9143[14]](function(_0x9787x12){if(_0x9787x12[_0x9143[35]]> 0){return _0x9787x9[_0x9143[13]](500)[_0x9143[12]]({message:_0x9143[37],translatedMessage:_0x9143[38]})};return _0x9787x11[_0x9143[36]]()})[_0x9143[14]](function(){return _0x9787x9[_0x9143[19]](204)})[_0x9143[11]](function(_0x9787xb){return handleError(_0x9787x9,_0x9787xb)})};exports[_0x9143[42]]= function(_0x9787x8,_0x9787x9){var _0x9787x13;return VoiceContext[_0x9143[26]]({where:{id:_0x9787x8[_0x9143[15]][_0x9143[43]]}})[_0x9143[14]](function(_0x9787xe){_0x9787x13= _0x9787xe;var _0x9787x14=_[_0x9143[44]](_0x9787x13,{defaultEntry:true});if(_0x9787x14){return _0x9787x9[_0x9143[13]](500)[_0x9143[12]]({message:_0x9143[40],translatedMessage:_0x9143[41]})};if(!_0x9787x13){return _0x9787x9[_0x9143[19]](404)};var _0x9787x15=_[_0x9143[46]](_[_0x9143[46]](_0x9787x13,_0x9143[45]),_0x9143[24]);return VoiceExtension[_0x9143[26]]({where:{context:_0x9787x15,VoiceContextId:null}})})[_0x9143[14]](function(_0x9787x12){if(_0x9787x12[_0x9143[35]]> _0x9787x13[_0x9143[35]]){return _0x9787x9[_0x9143[13]](500)[_0x9143[12]]({message:_0x9143[37],translatedMessage:_0x9143[38]})};return VoiceContext[_0x9143[36]]({where:{id:_0x9787x8[_0x9143[15]][_0x9143[43]]},individualHooks:true})})[_0x9143[14]](function(){return _0x9787x9[_0x9143[19]](204)})[_0x9143[11]](function(_0x9787xb){return handleError(_0x9787x9,_0x9787xb)})};function handleError(_0x9787x9,_0x9787xb){logger[_0x9143[48]](_0x9787xb[_0x9143[47]]);return _0x9787x9[_0x9143[13]](500)[_0x9143[12]](_0x9787xb)}
\ No newline at end of file