Built motion from commit afa0b9352.|1.0.30
[motion.git] / server / api / voice_extension / voice_extension.controller.js
index ed31cdb..4c856d3 100644 (file)
@@ -1 +1 @@
-var _0x6716=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x53\x65\x71\x75\x65\x6C\x69\x7A\x65","\x75\x74\x69\x6C","\x61\x73\x79\x6E\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C\x73\x2F\x76\x6F\x69\x63\x65\x5F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\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","\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\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","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x72\x6F\x75\x74\x65\x73","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x73\x63\x6F\x70\x65","\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\x4F\x6E\x65","\x63\x72\x65\x61\x74\x65","\x6D\x65\x73\x73\x61\x67\x65","\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x2F\x63\x6F\x6E\x74\x65\x78\x74\x20\x63\x6F\x6D\x62\x69\x6E\x61\x74\x69\x6F\x6E\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x65\x78\x69\x73\x74","\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\x52\x4F\x55\x54\x45","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65\x41\x70\x70\x73","\x69\x73\x41\x72\x72\x61\x79","\x6C\x65\x6E\x67\x74\x68","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x72\x6F\x75\x74\x65\x55\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x66\x69\x6E\x64\x42\x79\x49\x64","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72"];_0x6716[0];var _=require(_0x6716[1]);var VoiceExtension=require(_0x6716[3])[_0x6716[2]];var Interval=require(_0x6716[3])[_0x6716[4]];var sequelize=require(_0x6716[3])[_0x6716[5]];var Sequelize=require(_0x6716[3])[_0x6716[6]];var util=require(_0x6716[7]);var async=require(_0x6716[8]);var veUtil=require(_0x6716[9]);var Util=require(_0x6716[10]);var logger=require(_0x6716[12])(_0x6716[11]);var Applications=veUtil[_0x6716[13]];exports[_0x6716[14]]= function(_0xcc2cxc,_0xcc2cxd,_0xcc2cxe){return VoiceExtension[_0x6716[25]](_0x6716[23],_0x6716[24])[_0x6716[22]](_[_0x6716[21]](Util[_0x6716[20]](_0xcc2cxc[_0x6716[19]]),{distinct:true}))[_0x6716[18]](function(_0xcc2cx10){_0xcc2cxd[_0x6716[17]](200)[_0x6716[16]](_0xcc2cx10)})[_0x6716[15]](function(_0xcc2cxf){return handleError(_0xcc2cxd,_0xcc2cxf)})};exports[_0x6716[26]]= function(_0xcc2cxc,_0xcc2cxd){return VoiceExtension[_0x6716[25]](_0x6716[24])[_0x6716[30]]({where:{id:_0xcc2cxc[_0x6716[29]][_0x6716[28]],VoiceExtensionId:null}})[_0x6716[18]](function(_0xcc2cx11){if(!_0xcc2cx11){return _0xcc2cxd[_0x6716[27]](404)};return _0xcc2cxd[_0x6716[16]](_0xcc2cx11)})[_0x6716[15]](function(_0xcc2cxf){return handleError(_0xcc2cxd,_0xcc2cxf)})};exports[_0x6716[31]]= function(_0xcc2cxc,_0xcc2cxd){var _0xcc2cx12;return sequelize[_0x6716[40]](function(_0xcc2cx13){return VoiceExtension[_0x6716[31]](_0xcc2cxc[_0x6716[36]],{transaction:_0xcc2cx13})[_0x6716[18]](function(_0xcc2cx14){_0xcc2cx12= _0xcc2cx14;if(_0xcc2cxc[_0x6716[36]][_0x6716[13]]&& Array[_0x6716[38]](_0xcc2cxc[_0x6716[36]].Applications)&& _0xcc2cxc[_0x6716[36]][_0x6716[13]][_0x6716[39]]){return _0xcc2cx14}})[_0x6716[18]](veUtil[_0x6716[37]](_0xcc2cxc[_0x6716[36]].Applications,_0xcc2cx13,_0xcc2cxd))})[_0x6716[18]](function(){return _0xcc2cxd[_0x6716[17]](201)[_0x6716[16]](_0xcc2cx12)})[_0x6716[15]](sequelize.UniqueConstraintError,function(_0xcc2cxf){_0xcc2cxf[_0x6716[32]]= _0x6716[33];_0xcc2cxf[_0x6716[34]]= _0x6716[35];return handleError(_0xcc2cxd,_0xcc2cxf)})[_0x6716[15]](sequelize.ValidationError,function(_0xcc2cxf){_0xcc2cxf[_0x6716[32]]= _0x6716[33];_0xcc2cxf[_0x6716[34]]= _0x6716[35];return handleError(_0xcc2cxd,_0xcc2cxf)})[_0x6716[15]](function(_0xcc2cxf){return handleError(_0xcc2cxd,_0xcc2cxf)})};exports[_0x6716[41]]= function(_0xcc2cxc,_0xcc2cxd){return sequelize[_0x6716[40]](function(_0xcc2cx13){return veUtil[_0x6716[42]](_0xcc2cxc,_0xcc2cx13)})[_0x6716[18]](function(){return _0xcc2cxd[_0x6716[27]](200)})[_0x6716[15]](sequelize.UniqueConstraintError,function(_0xcc2cxf){_0xcc2cxf[_0x6716[32]]= _0x6716[33];_0xcc2cxf[_0x6716[34]]= _0x6716[35];return handleError(_0xcc2cxd,_0xcc2cxf)})[_0x6716[15]](function(_0xcc2cxf){return handleError(_0xcc2cxd,_0xcc2cxf)})};exports[_0x6716[43]]= function(_0xcc2cxc,_0xcc2cxd,_0xcc2cxe){return sequelize[_0x6716[40]](function(_0xcc2cx13){return VoiceExtension[_0x6716[44]](_0xcc2cxc[_0x6716[29]][_0x6716[28]])[_0x6716[18]](function(_0xcc2cx11){if(!_0xcc2cx11){return _0xcc2cxd[_0x6716[27]](404)};return _0xcc2cx11[_0x6716[43]]()})})[_0x6716[18]](function(){return _0xcc2cxd[_0x6716[27]](204)})[_0x6716[15]](function(_0xcc2cxf){return handleError(_0xcc2cxd,_0xcc2cxf)})};exports[_0x6716[45]]= function(_0xcc2cxc,_0xcc2cxd){return VoiceExtension[_0x6716[43]]({where:{id:_0xcc2cxc[_0x6716[19]][_0x6716[46]]},individualHooks:true})[_0x6716[18]](function(){return _0xcc2cxd[_0x6716[27]](204)})[_0x6716[15]](function(_0xcc2cxf){return handleError(_0xcc2cxd,_0xcc2cxf)})};function handleError(_0xcc2cxd,_0xcc2cxf){logger[_0x6716[48]](_0xcc2cxf[_0x6716[47]]);return _0xcc2cxd[_0x6716[17]](500)[_0x6716[16]](_0xcc2cxf)}
\ No newline at end of file
+var _0x5667=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x53\x65\x71\x75\x65\x6C\x69\x7A\x65","\x75\x74\x69\x6C","\x61\x73\x79\x6E\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C\x73\x2F\x76\x6F\x69\x63\x65\x5F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\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","\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\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","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x72\x6F\x75\x74\x65\x73","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x73\x63\x6F\x70\x65","\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\x4F\x6E\x65","\x63\x72\x65\x61\x74\x65","\x6D\x65\x73\x73\x61\x67\x65","\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x2F\x63\x6F\x6E\x74\x65\x78\x74\x20\x63\x6F\x6D\x62\x69\x6E\x61\x74\x69\x6F\x6E\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x65\x78\x69\x73\x74","\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\x52\x4F\x55\x54\x45","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65\x41\x70\x70\x73","\x69\x73\x41\x72\x72\x61\x79","\x6C\x65\x6E\x67\x74\x68","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x72\x6F\x75\x74\x65\x55\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x66\x69\x6E\x64\x42\x79\x49\x64","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72"];_0x5667[0];var _=require(_0x5667[1]);var VoiceExtension=require(_0x5667[3])[_0x5667[2]];var Interval=require(_0x5667[3])[_0x5667[4]];var sequelize=require(_0x5667[3])[_0x5667[5]];var Sequelize=require(_0x5667[3])[_0x5667[6]];var util=require(_0x5667[7]);var async=require(_0x5667[8]);var veUtil=require(_0x5667[9]);var Util=require(_0x5667[10]);var logger=require(_0x5667[12])(_0x5667[11]);var Applications=veUtil[_0x5667[13]];exports[_0x5667[14]]= function(_0xe7d7xc,_0xe7d7xd,_0xe7d7xe){return VoiceExtension[_0x5667[25]](_0x5667[23],_0x5667[24])[_0x5667[22]](_[_0x5667[21]](Util[_0x5667[20]](_0xe7d7xc[_0x5667[19]]),{distinct:true}))[_0x5667[18]](function(_0xe7d7x10){_0xe7d7xd[_0x5667[17]](200)[_0x5667[16]](_0xe7d7x10)})[_0x5667[15]](function(_0xe7d7xf){return handleError(_0xe7d7xd,_0xe7d7xf)})};exports[_0x5667[26]]= function(_0xe7d7xc,_0xe7d7xd){return VoiceExtension[_0x5667[25]](_0x5667[24])[_0x5667[30]]({where:{id:_0xe7d7xc[_0x5667[29]][_0x5667[28]],VoiceExtensionId:null}})[_0x5667[18]](function(_0xe7d7x11){if(!_0xe7d7x11){return _0xe7d7xd[_0x5667[27]](404)};return _0xe7d7xd[_0x5667[16]](_0xe7d7x11)})[_0x5667[15]](function(_0xe7d7xf){return handleError(_0xe7d7xd,_0xe7d7xf)})};exports[_0x5667[31]]= function(_0xe7d7xc,_0xe7d7xd){var _0xe7d7x12;return sequelize[_0x5667[40]](function(_0xe7d7x13){return VoiceExtension[_0x5667[31]](_0xe7d7xc[_0x5667[36]],{transaction:_0xe7d7x13})[_0x5667[18]](function(_0xe7d7x14){_0xe7d7x12= _0xe7d7x14;if(_0xe7d7xc[_0x5667[36]][_0x5667[13]]&& Array[_0x5667[38]](_0xe7d7xc[_0x5667[36]].Applications)&& _0xe7d7xc[_0x5667[36]][_0x5667[13]][_0x5667[39]]){return _0xe7d7x14}})[_0x5667[18]](veUtil[_0x5667[37]](_0xe7d7xc[_0x5667[36]].Applications,_0xe7d7x13,_0xe7d7xd))})[_0x5667[18]](function(){return _0xe7d7xd[_0x5667[17]](201)[_0x5667[16]](_0xe7d7x12)})[_0x5667[15]](sequelize.UniqueConstraintError,function(_0xe7d7xf){_0xe7d7xf[_0x5667[32]]= _0x5667[33];_0xe7d7xf[_0x5667[34]]= _0x5667[35];return handleError(_0xe7d7xd,_0xe7d7xf)})[_0x5667[15]](sequelize.ValidationError,function(_0xe7d7xf){_0xe7d7xf[_0x5667[32]]= _0x5667[33];_0xe7d7xf[_0x5667[34]]= _0x5667[35];return handleError(_0xe7d7xd,_0xe7d7xf)})[_0x5667[15]](function(_0xe7d7xf){return handleError(_0xe7d7xd,_0xe7d7xf)})};exports[_0x5667[41]]= function(_0xe7d7xc,_0xe7d7xd){return sequelize[_0x5667[40]](function(_0xe7d7x13){return veUtil[_0x5667[42]](_0xe7d7xc,_0xe7d7x13)})[_0x5667[18]](function(){return _0xe7d7xd[_0x5667[27]](200)})[_0x5667[15]](sequelize.UniqueConstraintError,function(_0xe7d7xf){_0xe7d7xf[_0x5667[32]]= _0x5667[33];_0xe7d7xf[_0x5667[34]]= _0x5667[35];return handleError(_0xe7d7xd,_0xe7d7xf)})[_0x5667[15]](function(_0xe7d7xf){return handleError(_0xe7d7xd,_0xe7d7xf)})};exports[_0x5667[43]]= function(_0xe7d7xc,_0xe7d7xd,_0xe7d7xe){return sequelize[_0x5667[40]](function(_0xe7d7x13){return VoiceExtension[_0x5667[44]](_0xe7d7xc[_0x5667[29]][_0x5667[28]])[_0x5667[18]](function(_0xe7d7x11){if(!_0xe7d7x11){return _0xe7d7xd[_0x5667[27]](404)};return _0xe7d7x11[_0x5667[43]]()})})[_0x5667[18]](function(){return _0xe7d7xd[_0x5667[27]](204)})[_0x5667[15]](function(_0xe7d7xf){return handleError(_0xe7d7xd,_0xe7d7xf)})};exports[_0x5667[45]]= function(_0xe7d7xc,_0xe7d7xd){return VoiceExtension[_0x5667[43]]({where:{id:_0xe7d7xc[_0x5667[19]][_0x5667[46]]},individualHooks:true})[_0x5667[18]](function(){return _0xe7d7xd[_0x5667[27]](204)})[_0x5667[15]](function(_0xe7d7xf){return handleError(_0xe7d7xd,_0xe7d7xf)})};function handleError(_0xe7d7xd,_0xe7d7xf){logger[_0x5667[48]](_0xe7d7xf[_0x5667[47]]);return _0xe7d7xd[_0x5667[17]](500)[_0x5667[16]](_0xe7d7xf)}
\ No newline at end of file