Built motion from commit ee17993.|1.0.6
[motion.git] / server / api / interval / interval.controller.js
index 263563c..83f58cf 100644 (file)
@@ -1 +1 @@
-var _0xb4d7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\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","\x69\x6E\x74\x65\x72\x76\x61\x6C\x73","\x73\x75\x62\x69\x6E\x74\x65\x72\x76\x61\x6C\x73","\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\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x6C\x6F\x67","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x61\x6C\x6C","\x61\x72\x65\x20\x74\x68\x65\x72\x65\x20\x69\x6E\x74\x65\x72\x76\x61\x6C\x73","\x53\x75\x62\x49\x6E\x74\x65\x72\x76\x61\x6C\x73","\x6C\x65\x6E\x67\x74\x68","\x64\x65\x73\x74\x72\x6F\x79","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x79\x65\x73\x20\x74\x68\x65\x72\x65\x20\x61\x72\x65","\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x6D\x65\x73\x73\x61\x67\x65","\x54\x68\x65\x20\x49\x6E\x74\x65\x72\x76\x61\x6C\x20\x69\x73\x20\x61\x73\x73\x6F\x63\x69\x61\x74\x65\x64\x20\x77\x69\x74\x68\x20\x6F\x6E\x65\x20\x6F\x72\x20\x6D\x6F\x72\x65\x20\x72\x6F\x75\x74\x65\x73\x2C\x20\x64\x65\x6C\x65\x74\x65\x20\x74\x68\x65\x6D\x20\x66\x69\x72\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\x49\x4E\x54\x45\x52\x56\x41\x4C\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"];_0xb4d7[0];var _=require(_0xb4d7[1]);var Interval=require(_0xb4d7[3])[_0xb4d7[2]];var VoiceExtension=require(_0xb4d7[3])[_0xb4d7[4]];var sequelize=require(_0xb4d7[3])[_0xb4d7[5]];var Util=require(_0xb4d7[6]);exports[_0xb4d7[7]]=function(_0x9984x6,_0x9984x7,_0x9984x8){return Interval[_0xb4d7[17]](_0xb4d7[15],_0xb4d7[16])[_0xb4d7[14]](Util[_0xb4d7[13]](_0x9984x6[_0xb4d7[12]]))[_0xb4d7[11]](function(_0x9984xa){_0x9984x7[_0xb4d7[10]](200)[_0xb4d7[9]](_0x9984xa)})[_0xb4d7[8]](function(_0x9984x9){return handleError(_0x9984x7,_0x9984x9)})};exports[_0xb4d7[18]]=function(_0x9984x6,_0x9984x7){return Interval[_0xb4d7[17]](_0xb4d7[16])[_0xb4d7[22]](_0x9984x6[_0xb4d7[21]][_0xb4d7[20]])[_0xb4d7[11]](function(_0x9984xb){if(!_0x9984xb){return _0x9984x7[_0xb4d7[19]](404)};return _0x9984x7[_0xb4d7[9]](_0x9984xb)})[_0xb4d7[8]](function(_0x9984x9){return handleError(_0x9984x7,_0x9984x9)})};exports[_0xb4d7[23]]=function(_0x9984x6,_0x9984x7){return Interval[_0xb4d7[17]](_0xb4d7[16])[_0xb4d7[23]](_0x9984x6[_0xb4d7[25]])[_0xb4d7[11]](function(_0x9984xb){return _0x9984x7[_0xb4d7[10]](201)[_0xb4d7[9]](_0x9984xb)})[_0xb4d7[8]](function(_0x9984x9){console[_0xb4d7[24]](_0x9984x9);return handleError(_0x9984x7,_0x9984x9)})};exports[_0xb4d7[26]]=function(_0x9984x6,_0x9984x7){return sequelize[_0xb4d7[32]](function(_0x9984xc){if(_0x9984x6[_0xb4d7[25]][_0xb4d7[20]]){delete _0x9984x6[_0xb4d7[25]][_0xb4d7[20]]};return Interval[_0xb4d7[26]](_0x9984x6[_0xb4d7[25]],{where:{id:_0x9984x6[_0xb4d7[21]][_0xb4d7[20]]},individualHooks:true,transaction:_0x9984xc})[_0xb4d7[11]](function(){if(_0x9984x6[_0xb4d7[25]][_0xb4d7[29]]){return Interval[_0xb4d7[31]]({where:{IntervalId:_0x9984x6[_0xb4d7[21]][_0xb4d7[20]]},transaction:_0x9984xc})}})[_0xb4d7[11]](function(){console[_0xb4d7[24]](_0xb4d7[28]);if(_0x9984x6[_0xb4d7[25]][_0xb4d7[29]]&&_0x9984x6[_0xb4d7[25]][_0xb4d7[29]][_0xb4d7[30]]){return _0x9984x6[_0xb4d7[21]][_0xb4d7[20]]}})[_0xb4d7[11]](bulkCreateSubIntervals(_0x9984x6[_0xb4d7[25]].SubIntervals,_0x9984xc))[_0xb4d7[27]]()})[_0xb4d7[11]](function(){return _0x9984x7[_0xb4d7[19]](200)})[_0xb4d7[8]](function(_0x9984x9){console[_0xb4d7[24]](_0x9984x9);return handleError(_0x9984x7,_0x9984x9)})};function bulkCreateSubIntervals(_0x9984xe,_0x9984xc){return function(_0x9984xf){if(_0x9984xf){console[_0xb4d7[24]](_0xb4d7[33]);var _0x9984x10=[];_0x9984xe[_0xb4d7[36]](function(_0x9984x11){delete _0x9984x11[_0xb4d7[20]];_0x9984x11[_0xb4d7[34]]=_0x9984xf;_0x9984x10[_0xb4d7[35]](Interval[_0xb4d7[23]](_0x9984x11,{transaction:_0x9984xc}))});return _0x9984x10}else {return []}}}exports[_0xb4d7[31]]=function(_0x9984x6,_0x9984x7){return sequelize[_0xb4d7[32]](function(_0x9984xc){return Interval[_0xb4d7[31]]({where:{id:_0x9984x6[_0xb4d7[21]][_0xb4d7[20]]},individualHooks:true,transaction:_0x9984xc})})[_0xb4d7[11]](function(){return _0x9984x7[_0xb4d7[19]](204)})[_0xb4d7[8]](sequelize.ForeignKeyConstraintError,function(_0x9984x9){_0x9984x9[_0xb4d7[37]]=_0xb4d7[38];_0x9984x9[_0xb4d7[39]]=_0xb4d7[40];return handleError(_0x9984x7,_0x9984x9)})[_0xb4d7[8]](function(_0x9984x9){return handleError(_0x9984x7,_0x9984x9)})};exports[_0xb4d7[41]]=function(_0x9984x6,_0x9984x7){return sequelize[_0xb4d7[32]](function(_0x9984xc){return Interval[_0xb4d7[31]]({where:{id:_0x9984x6[_0xb4d7[12]][_0xb4d7[42]]},individualHooks:true,transaction:_0x9984xc})})[_0xb4d7[11]](function(){return _0x9984x7[_0xb4d7[19]](204)})[_0xb4d7[8]](sequelize.ForeignKeyConstraintError,function(_0x9984x9){_0x9984x9[_0xb4d7[37]]=_0xb4d7[38];_0x9984x9[_0xb4d7[39]]=_0xb4d7[40];return handleError(_0x9984x7,_0x9984x9)})[_0xb4d7[8]](function(_0x9984x9){return handleError(_0x9984x7,_0x9984x9)})};function handleError(_0x9984x7,_0x9984x9){return _0x9984x7[_0xb4d7[10]](500)[_0xb4d7[9]](_0x9984x9)}
\ No newline at end of file
+var _0x8c56=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x62\x6C\x75\x65\x62\x69\x72\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\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","\x69\x6E\x74\x65\x72\x76\x61\x6C\x73","\x73\x75\x62\x69\x6E\x74\x65\x72\x76\x61\x6C\x73","\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\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x6C\x6F\x67","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x53\x75\x62\x49\x6E\x74\x65\x72\x76\x61\x6C\x73","\x6C\x65\x6E\x67\x74\x68","\x64\x65\x73\x74\x72\x6F\x79","\x63\x6C\x6F\x6E\x65","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x61\x6C\x6C","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x6D\x61\x70","\x66\x69\x6E\x64","\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64","\x70\x75\x73\x68","\x72\x65\x6D\x6F\x76\x65","\x66\x6F\x72\x45\x61\x63\x68","\x6D\x65\x73\x73\x61\x67\x65","\x54\x68\x65\x20\x49\x6E\x74\x65\x72\x76\x61\x6C\x20\x69\x73\x20\x61\x73\x73\x6F\x63\x69\x61\x74\x65\x64\x20\x77\x69\x74\x68\x20\x6F\x6E\x65\x20\x6F\x72\x20\x6D\x6F\x72\x65\x20\x72\x6F\x75\x74\x65\x73\x2C\x20\x64\x65\x6C\x65\x74\x65\x20\x74\x68\x65\x6D\x20\x66\x69\x72\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\x49\x4E\x54\x45\x52\x56\x41\x4C\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"];_0x8c56[0];var _=require(_0x8c56[1]);var Interval=require(_0x8c56[3])[_0x8c56[2]];var VoiceExtension=require(_0x8c56[3])[_0x8c56[4]];var sequelize=require(_0x8c56[3])[_0x8c56[5]];var Promise=require(_0x8c56[6]);var Util=require(_0x8c56[7]);exports[_0x8c56[8]]= function(_0xfe93x7,_0xfe93x8,_0xfe93x9){return Interval[_0x8c56[19]](_0x8c56[17],_0x8c56[18])[_0x8c56[16]](_[_0x8c56[15]](Util[_0x8c56[14]](_0xfe93x7[_0x8c56[13]]),{distinct:true}))[_0x8c56[12]](function(_0xfe93xb){_0xfe93x8[_0x8c56[11]](200)[_0x8c56[10]](_0xfe93xb)})[_0x8c56[9]](function(_0xfe93xa){return handleError(_0xfe93x8,_0xfe93xa)})};exports[_0x8c56[20]]= function(_0xfe93x7,_0xfe93x8){return Interval[_0x8c56[19]](_0x8c56[18])[_0x8c56[24]](_0xfe93x7[_0x8c56[23]][_0x8c56[22]])[_0x8c56[12]](function(_0xfe93xc){if(!_0xfe93xc){return _0xfe93x8[_0x8c56[21]](404)};return _0xfe93x8[_0x8c56[10]](_0xfe93xc)})[_0x8c56[9]](function(_0xfe93xa){return handleError(_0xfe93x8,_0xfe93xa)})};exports[_0x8c56[25]]= function(_0xfe93x7,_0xfe93x8){return Interval[_0x8c56[19]](_0x8c56[18])[_0x8c56[25]](_0xfe93x7[_0x8c56[27]])[_0x8c56[12]](function(_0xfe93xc){return _0xfe93x8[_0x8c56[11]](201)[_0x8c56[10]](_0xfe93xc)})[_0x8c56[9]](function(_0xfe93xa){console[_0x8c56[26]](_0xfe93xa);return handleError(_0xfe93x8,_0xfe93xa)})};exports[_0x8c56[28]]= function(_0xfe93x7,_0xfe93x8){var _0xfe93xd;return sequelize[_0x8c56[34]](function(_0xfe93xe){if(_0xfe93x7[_0x8c56[27]][_0x8c56[22]]){delete _0xfe93x7[_0x8c56[27]][_0x8c56[22]]};return Interval[_0x8c56[19]](_0x8c56[18])[_0x8c56[24]](_0xfe93x7[_0x8c56[23]][_0x8c56[22]])[_0x8c56[12]](function(_0xfe93xc){if(!_0xfe93xc){return _0xfe93x8[_0x8c56[21]](404)};_0xfe93xd= _[_0x8c56[32]](_0xfe93xc);return _0xfe93xc[_0x8c56[33]](_0xfe93x7[_0x8c56[27]],{transaction:_0xfe93xe})})[_0x8c56[12]](function(){if(_0xfe93x7[_0x8c56[27]][_0x8c56[29]]&& !_0xfe93x7[_0x8c56[27]][_0x8c56[29]][_0x8c56[30]]){return Interval[_0x8c56[31]]({where:{IntervalId:_0xfe93x7[_0x8c56[23]][_0x8c56[22]]},individualHooks:true,transaction:_0xfe93xe})}else {if(_0xfe93x7[_0x8c56[27]][_0x8c56[29]]&& _0xfe93x7[_0x8c56[27]][_0x8c56[29]][_0x8c56[30]]){return bulkCreateSubIntervals(_0xfe93x7[_0x8c56[27]].SubIntervals,_0xfe93xd,_0xfe93xe)}}})})[_0x8c56[12]](function(){return _0xfe93x8[_0x8c56[21]](200)})[_0x8c56[9]](function(_0xfe93xa){console[_0x8c56[26]](_0xfe93xa);return handleError(_0xfe93x8,_0xfe93xa)})};function bulkCreateSubIntervals(_0xfe93x10,_0xfe93xd,_0xfe93xe){return Promise[_0x8c56[35]]([])[_0x8c56[12]](function(){var _0xfe93x11=[];var _0xfe93x12=_[_0x8c56[37]](_0xfe93xd.SubIntervals,_0x8c56[36]);var _0xfe93x13;_[_0x8c56[42]](_0xfe93x12,function(_0xfe93x14,_0xfe93x15){_0xfe93x13= _[_0x8c56[38]](_0xfe93x10,{id:_0xfe93x14[_0x8c56[22]]});if(_0xfe93x13){_0xfe93x13[_0x8c56[39]]= _0xfe93xd[_0x8c56[22]];_0xfe93x11[_0x8c56[40]](Interval[_0x8c56[28]](_[_0x8c56[32]](_0xfe93x13),{where:{id:_0xfe93x14[_0x8c56[22]]},transaction:_0xfe93xe,individualHooks:true}));_[_0x8c56[41]](_0xfe93x10,{id:_0xfe93x14[_0x8c56[22]]})}else {_0xfe93x11[_0x8c56[40]](Interval[_0x8c56[31]]({where:{id:_0xfe93x14[_0x8c56[22]]},individualHooks:true,transaction:_0xfe93xe}))}});_[_0x8c56[42]](_0xfe93x10,function(_0xfe93x14){_0xfe93x14[_0x8c56[39]]= _0xfe93xd[_0x8c56[22]];_0xfe93x11[_0x8c56[40]](Interval[_0x8c56[25]](_0xfe93x14,{transaction:_0xfe93xe}))});return _0xfe93x11})[_0x8c56[35]]()}exports[_0x8c56[31]]= function(_0xfe93x7,_0xfe93x8){return sequelize[_0x8c56[34]](function(_0xfe93xe){return Interval[_0x8c56[31]]({where:{id:_0xfe93x7[_0x8c56[23]][_0x8c56[22]]},individualHooks:true,transaction:_0xfe93xe})})[_0x8c56[12]](function(){return _0xfe93x8[_0x8c56[21]](204)})[_0x8c56[9]](sequelize.ForeignKeyConstraintError,function(_0xfe93xa){_0xfe93xa[_0x8c56[43]]= _0x8c56[44];_0xfe93xa[_0x8c56[45]]= _0x8c56[46];return handleError(_0xfe93x8,_0xfe93xa)})[_0x8c56[9]](function(_0xfe93xa){return handleError(_0xfe93x8,_0xfe93xa)})};exports[_0x8c56[47]]= function(_0xfe93x7,_0xfe93x8){return sequelize[_0x8c56[34]](function(_0xfe93xe){return Interval[_0x8c56[31]]({where:{id:_0xfe93x7[_0x8c56[13]][_0x8c56[48]]},individualHooks:true,transaction:_0xfe93xe})})[_0x8c56[12]](function(){return _0xfe93x8[_0x8c56[21]](204)})[_0x8c56[9]](sequelize.ForeignKeyConstraintError,function(_0xfe93xa){_0xfe93xa[_0x8c56[43]]= _0x8c56[44];_0xfe93xa[_0x8c56[45]]= _0x8c56[46];return handleError(_0xfe93x8,_0xfe93xa)})[_0x8c56[9]](function(_0xfe93xa){return handleError(_0xfe93x8,_0xfe93xa)})};function handleError(_0xfe93x8,_0xfe93xa){return _0xfe93x8[_0x8c56[11]](500)[_0x8c56[10]](_0xfe93xa)}
\ No newline at end of file