Built motion from commit 0c27b27.|1.0.11
[motion.git] / server / api / voice_extension / voice_extension.controller.js
1 var _0xebaa=["\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","\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x69\x6E\x64\x65\x78","\x6C\x6F\x67","\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","\x65\x72\x72","\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"];_0xebaa[0];var _=require(_0xebaa[1]);var VoiceExtension=require(_0xebaa[3])[_0xebaa[2]];var Interval=require(_0xebaa[3])[_0xebaa[4]];var sequelize=require(_0xebaa[3])[_0xebaa[5]];var Sequelize=require(_0xebaa[3])[_0xebaa[6]];var util=require(_0xebaa[7]);var async=require(_0xebaa[8]);var veUtil=require(_0xebaa[9]);var Util=require(_0xebaa[10]);var Applications=veUtil[_0xebaa[11]];exports[_0xebaa[12]]= function(_0xe4d7xb,_0xe4d7xc,_0xe4d7xd){return VoiceExtension[_0xebaa[24]](_0xebaa[22],_0xebaa[23])[_0xebaa[21]](_[_0xebaa[20]](Util[_0xebaa[19]](_0xe4d7xb[_0xebaa[18]]),{distinct:true}))[_0xebaa[17]](function(_0xe4d7xf){_0xe4d7xc[_0xebaa[16]](200)[_0xebaa[15]](_0xe4d7xf)})[_0xebaa[14]](function(_0xe4d7xe){console[_0xebaa[13]](_0xe4d7xe);return handleError(_0xe4d7xc,_0xe4d7xe)})};exports[_0xebaa[25]]= function(_0xe4d7xb,_0xe4d7xc){return VoiceExtension[_0xebaa[24]](_0xebaa[23])[_0xebaa[29]]({where:{id:_0xe4d7xb[_0xebaa[28]][_0xebaa[27]],VoiceExtensionId:null}})[_0xebaa[17]](function(_0xe4d7x10){if(!_0xe4d7x10){return _0xe4d7xc[_0xebaa[26]](404)};return _0xe4d7xc[_0xebaa[15]](_0xe4d7x10)})[_0xebaa[14]](function(_0xe4d7xe){return handleError(_0xe4d7xc,_0xe4d7xe)})};exports[_0xebaa[30]]= function(_0xe4d7xb,_0xe4d7xc){var _0xe4d7x11;return sequelize[_0xebaa[40]](function(_0xe4d7x12){return VoiceExtension[_0xebaa[30]](_0xe4d7xb[_0xebaa[36]],{transaction:_0xe4d7x12})[_0xebaa[17]](function(_0xe4d7x13){_0xe4d7x11= _0xe4d7x13;if(_0xe4d7xb[_0xebaa[36]][_0xebaa[11]]&& Array[_0xebaa[38]](_0xe4d7xb[_0xebaa[36]].Applications)&& _0xe4d7xb[_0xebaa[36]][_0xebaa[11]][_0xebaa[39]]){return _0xe4d7x13}})[_0xebaa[17]](veUtil[_0xebaa[37]](_0xe4d7xb[_0xebaa[36]].Applications,_0xe4d7x12,_0xe4d7xc))})[_0xebaa[17]](function(){return _0xe4d7xc[_0xebaa[16]](201)[_0xebaa[15]](_0xe4d7x11)})[_0xebaa[14]](sequelize.UniqueConstraintError,function(_0xe4d7xe){_0xe4d7xe[_0xebaa[32]]= _0xebaa[33];_0xe4d7xe[_0xebaa[34]]= _0xebaa[35];return handleError(_0xe4d7xc,_0xe4d7xe)})[_0xebaa[14]](sequelize.ValidationError,function(_0xe4d7xe){_0xe4d7xe[_0xebaa[32]]= _0xebaa[33];_0xe4d7xe[_0xebaa[34]]= _0xebaa[35];return handleError(_0xe4d7xc,_0xe4d7xe)})[_0xebaa[14]](function(_0xe4d7xe){console[_0xebaa[13]](_0xebaa[31],_0xe4d7xe);return handleError(_0xe4d7xc,_0xe4d7xe)})};exports[_0xebaa[41]]= function(_0xe4d7xb,_0xe4d7xc){return sequelize[_0xebaa[40]](function(_0xe4d7x12){return veUtil[_0xebaa[42]](_0xe4d7xb,_0xe4d7x12)})[_0xebaa[17]](function(){return _0xe4d7xc[_0xebaa[26]](200)})[_0xebaa[14]](sequelize.UniqueConstraintError,function(_0xe4d7xe){_0xe4d7xe[_0xebaa[32]]= _0xebaa[33];_0xe4d7xe[_0xebaa[34]]= _0xebaa[35];console[_0xebaa[13]](_0xe4d7xe);return handleError(_0xe4d7xc,_0xe4d7xe)})[_0xebaa[14]](function(_0xe4d7xe){console[_0xebaa[13]](_0xe4d7xe);return handleError(_0xe4d7xc,_0xe4d7xe)})};exports[_0xebaa[43]]= function(_0xe4d7xb,_0xe4d7xc,_0xe4d7xd){return sequelize[_0xebaa[40]](function(_0xe4d7x12){return VoiceExtension[_0xebaa[44]](_0xe4d7xb[_0xebaa[28]][_0xebaa[27]])[_0xebaa[17]](function(_0xe4d7x10){if(!_0xe4d7x10){return _0xe4d7xc[_0xebaa[26]](404)};return _0xe4d7x10[_0xebaa[43]]()})})[_0xebaa[17]](function(){return _0xe4d7xc[_0xebaa[26]](204)})[_0xebaa[14]](function(_0xe4d7xe){console[_0xebaa[13]](_0xe4d7xe);return handleError(_0xe4d7xc,_0xe4d7xe)})};exports[_0xebaa[45]]= function(_0xe4d7xb,_0xe4d7xc){return VoiceExtension[_0xebaa[43]]({where:{id:_0xe4d7xb[_0xebaa[18]][_0xebaa[46]]},individualHooks:true})[_0xebaa[17]](function(){return _0xe4d7xc[_0xebaa[26]](204)})[_0xebaa[14]](function(_0xe4d7xe){return handleError(_0xe4d7xc,_0xe4d7xe)})};function handleError(_0xe4d7xc,_0xe4d7xe){return _0xe4d7xc[_0xebaa[16]](500)[_0xebaa[15]](_0xe4d7xe)}