Built motion from commit 943eae279.|1.0.24
[motion.git] / server / api / voice_context / voice_context.controller.js
index 95dc7eb..712019f 100644 (file)
@@ -1 +1 @@
-var _0xe36d=["\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"];_0xe36d[0];var _=require(_0xe36d[1]);var util=require(_0xe36d[2]);var logger=require(_0xe36d[4])(_0xe36d[3]);var Util=require(_0xe36d[5]);var sequelize=require(_0xe36d[7])[_0xe36d[6]];var VoiceContext=require(_0xe36d[7])[_0xe36d[8]];var VoiceExtension=require(_0xe36d[7])[_0xe36d[9]];exports[_0xe36d[10]]= function(_0x6a1dx8,_0x6a1dx9,_0x6a1dxa){return VoiceContext[_0xe36d[17]](Util[_0xe36d[16]](_0x6a1dx8[_0xe36d[15]]))[_0xe36d[14]](function(_0x6a1dxc){_0x6a1dx9[_0xe36d[13]](200)[_0xe36d[12]](_0x6a1dxc)})[_0xe36d[11]](function(_0x6a1dxb){return handleError(_0x6a1dx9,_0x6a1dxb)})};exports[_0xe36d[18]]= function(_0x6a1dx8,_0x6a1dx9){return VoiceContext[_0xe36d[22]](_0x6a1dx8[_0xe36d[21]][_0xe36d[20]])[_0xe36d[14]](function(_0x6a1dxd){if(!_0x6a1dxd){return _0x6a1dx9[_0xe36d[19]](404)};return _0x6a1dx9[_0xe36d[12]](_0x6a1dxd)})[_0xe36d[11]](function(_0x6a1dxb){return handleError(_0x6a1dx9,_0x6a1dxb)})};exports[_0xe36d[23]]= function(_0x6a1dx8,_0x6a1dx9){return VoiceContext[_0xe36d[26]]({where:{name:_0x6a1dx8[_0xe36d[25]][_0xe36d[24]]}})[_0xe36d[14]](function(_0x6a1dxe){if(!_0x6a1dxe){return _0x6a1dx9[_0xe36d[19]](404)};return _0x6a1dx9[_0xe36d[12]](_0x6a1dxe)})[_0xe36d[11]](function(_0x6a1dxb){return handleError(_0x6a1dx9,_0x6a1dxb)})};exports[_0xe36d[27]]= function(_0x6a1dx8,_0x6a1dx9){return VoiceContext[_0xe36d[27]](_0x6a1dx8[_0xe36d[25]])[_0xe36d[14]](function(_0x6a1dxd){return _0x6a1dx9[_0xe36d[13]](201)[_0xe36d[12]](_0x6a1dxd)})[_0xe36d[11]](sequelize.UniqueConstraintError,function(_0x6a1dxb){_0x6a1dxb[_0xe36d[28]]= _0xe36d[29];_0x6a1dxb[_0xe36d[30]]= _0xe36d[31];return handleError(_0x6a1dx9,_0x6a1dxb)})[_0xe36d[11]](function(_0x6a1dxb){return handleError(_0x6a1dx9,_0x6a1dxb)})};exports[_0xe36d[32]]= function(_0x6a1dx8,_0x6a1dx9){return VoiceContext[_0xe36d[26]]({where:{name:_0x6a1dx8[_0xe36d[25]][_0xe36d[24]],id:{$ne:_0x6a1dx8[_0xe36d[25]][_0xe36d[20]]}}})[_0xe36d[14]](function(_0x6a1dx10){if(!_0x6a1dx10){return _0x6a1dx9[_0xe36d[19]](404)};if(_0x6a1dx10[_0xe36d[35]]> 0){return _0x6a1dx9[_0xe36d[13]](500)[_0xe36d[12]]({message:_0xe36d[31]})};if(_0x6a1dx8[_0xe36d[25]][_0xe36d[20]]){delete _0x6a1dx8[_0xe36d[25]][_0xe36d[20]]};return VoiceContext[_0xe36d[22]](_0x6a1dx8[_0xe36d[21]][_0xe36d[20]])})[_0xe36d[14]](function(_0x6a1dxd){if(!_0x6a1dxd){return _0x6a1dx9[_0xe36d[19]](404)};var _0x6a1dxf=_[_0xe36d[33]](_0x6a1dxd,_0x6a1dx8[_0xe36d[25]]);return _0x6a1dxf[_0xe36d[34]]()})[_0xe36d[14]](function(_0x6a1dxd){return _0x6a1dx9[_0xe36d[13]](200)[_0xe36d[12]](_0x6a1dxd)})[_0xe36d[11]](function(_0x6a1dxb){return handleError(_0x6a1dx9,_0x6a1dxb)})};exports[_0xe36d[36]]= function(_0x6a1dx8,_0x6a1dx9){var _0x6a1dx11;return VoiceContext[_0xe36d[22]](_0x6a1dx8[_0xe36d[21]][_0xe36d[20]])[_0xe36d[14]](function(_0x6a1dxd){_0x6a1dx11= _0x6a1dxd;if(!_0x6a1dx11){return _0x6a1dx9[_0xe36d[19]](404)};if(_0x6a1dx11[_0xe36d[39]]){return _0x6a1dx9[_0xe36d[13]](500)[_0xe36d[12]]({message:_0xe36d[40],translatedMessage:_0xe36d[41]})};return VoiceExtension[_0xe36d[26]]({where:{context:_0x6a1dx11[_0xe36d[24]],VoiceContextId:null}})})[_0xe36d[14]](function(_0x6a1dx12){if(_0x6a1dx12[_0xe36d[35]]> 0){return _0x6a1dx9[_0xe36d[13]](500)[_0xe36d[12]]({message:_0xe36d[37],translatedMessage:_0xe36d[38]})};return _0x6a1dx11[_0xe36d[36]]()})[_0xe36d[14]](function(){return _0x6a1dx9[_0xe36d[19]](204)})[_0xe36d[11]](function(_0x6a1dxb){return handleError(_0x6a1dx9,_0x6a1dxb)})};exports[_0xe36d[42]]= function(_0x6a1dx8,_0x6a1dx9){var _0x6a1dx13;return VoiceContext[_0xe36d[26]]({where:{id:_0x6a1dx8[_0xe36d[15]][_0xe36d[43]]}})[_0xe36d[14]](function(_0x6a1dxe){_0x6a1dx13= _0x6a1dxe;var _0x6a1dx14=_[_0xe36d[44]](_0x6a1dx13,{defaultEntry:true});if(_0x6a1dx14){return _0x6a1dx9[_0xe36d[13]](500)[_0xe36d[12]]({message:_0xe36d[40],translatedMessage:_0xe36d[41]})};if(!_0x6a1dx13){return _0x6a1dx9[_0xe36d[19]](404)};var _0x6a1dx15=_[_0xe36d[46]](_[_0xe36d[46]](_0x6a1dx13,_0xe36d[45]),_0xe36d[24]);return VoiceExtension[_0xe36d[26]]({where:{context:_0x6a1dx15,VoiceContextId:null}})})[_0xe36d[14]](function(_0x6a1dx12){if(_0x6a1dx12[_0xe36d[35]]> _0x6a1dx13[_0xe36d[35]]){return _0x6a1dx9[_0xe36d[13]](500)[_0xe36d[12]]({message:_0xe36d[37],translatedMessage:_0xe36d[38]})};return VoiceContext[_0xe36d[36]]({where:{id:_0x6a1dx8[_0xe36d[15]][_0xe36d[43]]},individualHooks:true})})[_0xe36d[14]](function(){return _0x6a1dx9[_0xe36d[19]](204)})[_0xe36d[11]](function(_0x6a1dxb){return handleError(_0x6a1dx9,_0x6a1dxb)})};function handleError(_0x6a1dx9,_0x6a1dxb){logger[_0xe36d[48]](_0x6a1dxb[_0xe36d[47]]);return _0x6a1dx9[_0xe36d[13]](500)[_0xe36d[12]](_0x6a1dxb)}
\ No newline at end of file
+var _0x71c4=["\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"];_0x71c4[0];var _=require(_0x71c4[1]);var util=require(_0x71c4[2]);var logger=require(_0x71c4[4])(_0x71c4[3]);var Util=require(_0x71c4[5]);var sequelize=require(_0x71c4[7])[_0x71c4[6]];var VoiceContext=require(_0x71c4[7])[_0x71c4[8]];var VoiceExtension=require(_0x71c4[7])[_0x71c4[9]];exports[_0x71c4[10]]= function(_0x42d1x8,_0x42d1x9,_0x42d1xa){return VoiceContext[_0x71c4[17]](Util[_0x71c4[16]](_0x42d1x8[_0x71c4[15]]))[_0x71c4[14]](function(_0x42d1xc){_0x42d1x9[_0x71c4[13]](200)[_0x71c4[12]](_0x42d1xc)})[_0x71c4[11]](function(_0x42d1xb){return handleError(_0x42d1x9,_0x42d1xb)})};exports[_0x71c4[18]]= function(_0x42d1x8,_0x42d1x9){return VoiceContext[_0x71c4[22]](_0x42d1x8[_0x71c4[21]][_0x71c4[20]])[_0x71c4[14]](function(_0x42d1xd){if(!_0x42d1xd){return _0x42d1x9[_0x71c4[19]](404)};return _0x42d1x9[_0x71c4[12]](_0x42d1xd)})[_0x71c4[11]](function(_0x42d1xb){return handleError(_0x42d1x9,_0x42d1xb)})};exports[_0x71c4[23]]= function(_0x42d1x8,_0x42d1x9){return VoiceContext[_0x71c4[26]]({where:{name:_0x42d1x8[_0x71c4[25]][_0x71c4[24]]}})[_0x71c4[14]](function(_0x42d1xe){if(!_0x42d1xe){return _0x42d1x9[_0x71c4[19]](404)};return _0x42d1x9[_0x71c4[12]](_0x42d1xe)})[_0x71c4[11]](function(_0x42d1xb){return handleError(_0x42d1x9,_0x42d1xb)})};exports[_0x71c4[27]]= function(_0x42d1x8,_0x42d1x9){return VoiceContext[_0x71c4[27]](_0x42d1x8[_0x71c4[25]])[_0x71c4[14]](function(_0x42d1xd){return _0x42d1x9[_0x71c4[13]](201)[_0x71c4[12]](_0x42d1xd)})[_0x71c4[11]](sequelize.UniqueConstraintError,function(_0x42d1xb){_0x42d1xb[_0x71c4[28]]= _0x71c4[29];_0x42d1xb[_0x71c4[30]]= _0x71c4[31];return handleError(_0x42d1x9,_0x42d1xb)})[_0x71c4[11]](function(_0x42d1xb){return handleError(_0x42d1x9,_0x42d1xb)})};exports[_0x71c4[32]]= function(_0x42d1x8,_0x42d1x9){return VoiceContext[_0x71c4[26]]({where:{name:_0x42d1x8[_0x71c4[25]][_0x71c4[24]],id:{$ne:_0x42d1x8[_0x71c4[25]][_0x71c4[20]]}}})[_0x71c4[14]](function(_0x42d1x10){if(!_0x42d1x10){return _0x42d1x9[_0x71c4[19]](404)};if(_0x42d1x10[_0x71c4[35]]> 0){return _0x42d1x9[_0x71c4[13]](500)[_0x71c4[12]]({message:_0x71c4[31]})};if(_0x42d1x8[_0x71c4[25]][_0x71c4[20]]){delete _0x42d1x8[_0x71c4[25]][_0x71c4[20]]};return VoiceContext[_0x71c4[22]](_0x42d1x8[_0x71c4[21]][_0x71c4[20]])})[_0x71c4[14]](function(_0x42d1xd){if(!_0x42d1xd){return _0x42d1x9[_0x71c4[19]](404)};var _0x42d1xf=_[_0x71c4[33]](_0x42d1xd,_0x42d1x8[_0x71c4[25]]);return _0x42d1xf[_0x71c4[34]]()})[_0x71c4[14]](function(_0x42d1xd){return _0x42d1x9[_0x71c4[13]](200)[_0x71c4[12]](_0x42d1xd)})[_0x71c4[11]](function(_0x42d1xb){return handleError(_0x42d1x9,_0x42d1xb)})};exports[_0x71c4[36]]= function(_0x42d1x8,_0x42d1x9){var _0x42d1x11;return VoiceContext[_0x71c4[22]](_0x42d1x8[_0x71c4[21]][_0x71c4[20]])[_0x71c4[14]](function(_0x42d1xd){_0x42d1x11= _0x42d1xd;if(!_0x42d1x11){return _0x42d1x9[_0x71c4[19]](404)};if(_0x42d1x11[_0x71c4[39]]){return _0x42d1x9[_0x71c4[13]](500)[_0x71c4[12]]({message:_0x71c4[40],translatedMessage:_0x71c4[41]})};return VoiceExtension[_0x71c4[26]]({where:{context:_0x42d1x11[_0x71c4[24]],VoiceContextId:null}})})[_0x71c4[14]](function(_0x42d1x12){if(_0x42d1x12[_0x71c4[35]]> 0){return _0x42d1x9[_0x71c4[13]](500)[_0x71c4[12]]({message:_0x71c4[37],translatedMessage:_0x71c4[38]})};return _0x42d1x11[_0x71c4[36]]()})[_0x71c4[14]](function(){return _0x42d1x9[_0x71c4[19]](204)})[_0x71c4[11]](function(_0x42d1xb){return handleError(_0x42d1x9,_0x42d1xb)})};exports[_0x71c4[42]]= function(_0x42d1x8,_0x42d1x9){var _0x42d1x13;return VoiceContext[_0x71c4[26]]({where:{id:_0x42d1x8[_0x71c4[15]][_0x71c4[43]]}})[_0x71c4[14]](function(_0x42d1xe){_0x42d1x13= _0x42d1xe;var _0x42d1x14=_[_0x71c4[44]](_0x42d1x13,{defaultEntry:true});if(_0x42d1x14){return _0x42d1x9[_0x71c4[13]](500)[_0x71c4[12]]({message:_0x71c4[40],translatedMessage:_0x71c4[41]})};if(!_0x42d1x13){return _0x42d1x9[_0x71c4[19]](404)};var _0x42d1x15=_[_0x71c4[46]](_[_0x71c4[46]](_0x42d1x13,_0x71c4[45]),_0x71c4[24]);return VoiceExtension[_0x71c4[26]]({where:{context:_0x42d1x15,VoiceContextId:null}})})[_0x71c4[14]](function(_0x42d1x12){if(_0x42d1x12[_0x71c4[35]]> _0x42d1x13[_0x71c4[35]]){return _0x42d1x9[_0x71c4[13]](500)[_0x71c4[12]]({message:_0x71c4[37],translatedMessage:_0x71c4[38]})};return VoiceContext[_0x71c4[36]]({where:{id:_0x42d1x8[_0x71c4[15]][_0x71c4[43]]},individualHooks:true})})[_0x71c4[14]](function(){return _0x42d1x9[_0x71c4[19]](204)})[_0x71c4[11]](function(_0x42d1xb){return handleError(_0x42d1x9,_0x42d1xb)})};function handleError(_0x42d1x9,_0x42d1xb){logger[_0x71c4[48]](_0x42d1xb[_0x71c4[47]]);return _0x42d1x9[_0x71c4[13]](500)[_0x71c4[12]](_0x42d1xb)}
\ No newline at end of file