Built motion from commit 0dbf6b8.|0.0.131
[motion.git] / server / api / interval / interval.controller.js
index 31b3b51..5cfa108 100644 (file)
@@ -1 +1 @@
-var _0x6bed=["\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","\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","\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"];_0x6bed[0];var _=require(_0x6bed[1]);var Interval=require(_0x6bed[3])[_0x6bed[2]];var VoiceExtension=require(_0x6bed[3])[_0x6bed[4]];var sequelize=require(_0x6bed[3])[_0x6bed[5]];var Util=require(_0x6bed[6]);exports[_0x6bed[7]]= function(_0xf7a2x6,_0xf7a2x7,_0xf7a2x8){return Interval[_0x6bed[17]](_0x6bed[15],_0x6bed[16])[_0x6bed[14]](Util[_0x6bed[13]](_0xf7a2x6[_0x6bed[12]]))[_0x6bed[11]](function(_0xf7a2xa){_0xf7a2x7[_0x6bed[10]](200)[_0x6bed[9]](_0xf7a2xa)})[_0x6bed[8]](function(_0xf7a2x9){return handleError(_0xf7a2x7,_0xf7a2x9)})};exports[_0x6bed[18]]= function(_0xf7a2x6,_0xf7a2x7){return Interval[_0x6bed[17]](_0x6bed[16])[_0x6bed[22]](_0xf7a2x6[_0x6bed[21]][_0x6bed[20]])[_0x6bed[11]](function(_0xf7a2xb){if(!_0xf7a2xb){return _0xf7a2x7[_0x6bed[19]](404)};return _0xf7a2x7[_0x6bed[9]](_0xf7a2xb)})[_0x6bed[8]](function(_0xf7a2x9){return handleError(_0xf7a2x7,_0xf7a2x9)})};exports[_0x6bed[23]]= function(_0xf7a2x6,_0xf7a2x7){return Interval[_0x6bed[17]](_0x6bed[16])[_0x6bed[23]](_0xf7a2x6[_0x6bed[25]])[_0x6bed[11]](function(_0xf7a2xb){return _0xf7a2x7[_0x6bed[10]](201)[_0x6bed[9]](_0xf7a2xb)})[_0x6bed[8]](function(_0xf7a2x9){console[_0x6bed[24]](_0xf7a2x9);return handleError(_0xf7a2x7,_0xf7a2x9)})};exports[_0x6bed[26]]= function(_0xf7a2x6,_0xf7a2x7){var _0xf7a2xc;return sequelize[_0x6bed[33]](function(_0xf7a2xd){if(_0xf7a2x6[_0x6bed[25]][_0x6bed[20]]){delete _0xf7a2x6[_0x6bed[25]][_0x6bed[20]]};return Interval[_0x6bed[17]](_0x6bed[16])[_0x6bed[22]](_0xf7a2x6[_0x6bed[21]][_0x6bed[20]])[_0x6bed[11]](function(_0xf7a2xb){if(!_0xf7a2xb){return _0xf7a2x7[_0x6bed[19]](404)};_0xf7a2xc= _[_0x6bed[31]](_0xf7a2xb);return _0xf7a2xb[_0x6bed[32]](_0xf7a2x6[_0x6bed[25]],{transaction:_0xf7a2xd})})[_0x6bed[11]](function(){if(_0xf7a2x6[_0x6bed[25]][_0x6bed[28]]&& !_0xf7a2x6[_0x6bed[25]][_0x6bed[28]][_0x6bed[29]]){return Interval[_0x6bed[30]]({where:{IntervalId:_0xf7a2x6[_0x6bed[21]][_0x6bed[20]]},transaction:_0xf7a2xd})}else {if(_0xf7a2x6[_0x6bed[25]][_0x6bed[28]]&& _0xf7a2x6[_0x6bed[25]][_0x6bed[28]][_0x6bed[29]]){return bulkCreateSubIntervals(_0xf7a2x6[_0x6bed[25]].SubIntervals,_0xf7a2xc,_0xf7a2xd)}}})[_0x6bed[27]]()})[_0x6bed[11]](function(){return _0xf7a2x7[_0x6bed[19]](200)})[_0x6bed[8]](function(_0xf7a2x9){console[_0x6bed[24]](_0xf7a2x9);return handleError(_0xf7a2x7,_0xf7a2x9)})};function bulkCreateSubIntervals(_0xf7a2xf,_0xf7a2xc,_0xf7a2xd){var _0xf7a2x10=[];var _0xf7a2x11=_[_0x6bed[35]](_0xf7a2xc.SubIntervals,_0x6bed[34]);var _0xf7a2x12;_[_0x6bed[40]](_0xf7a2x11,function(_0xf7a2x13,_0xf7a2x14){_0xf7a2x12= _[_0x6bed[36]](_0xf7a2xf,{id:_0xf7a2x13[_0x6bed[20]]});if(_0xf7a2x12){_0xf7a2x12[_0x6bed[37]]= _0xf7a2xc[_0x6bed[20]];_0xf7a2x10[_0x6bed[38]](Interval[_0x6bed[26]](_[_0x6bed[31]](_0xf7a2x12),{where:{id:_0xf7a2x13[_0x6bed[20]]},transaction:_0xf7a2xd,individualHooks:true}));_[_0x6bed[39]](_0xf7a2xf,{id:_0xf7a2x13[_0x6bed[20]]})}else {_0xf7a2x10[_0x6bed[38]](Interval[_0x6bed[30]]({where:{id:_0xf7a2x13[_0x6bed[20]]},transaction:_0xf7a2xd}))}});_[_0x6bed[40]](_0xf7a2xf,function(_0xf7a2x13){_0xf7a2x13[_0x6bed[37]]= _0xf7a2xc[_0x6bed[20]];_0xf7a2x10[_0x6bed[38]](Interval[_0x6bed[23]](_0xf7a2x13,{transaction:_0xf7a2xd}))});return _0xf7a2x10}exports[_0x6bed[30]]= function(_0xf7a2x6,_0xf7a2x7){return sequelize[_0x6bed[33]](function(_0xf7a2xd){return Interval[_0x6bed[30]]({where:{id:_0xf7a2x6[_0x6bed[21]][_0x6bed[20]]},individualHooks:true,transaction:_0xf7a2xd})})[_0x6bed[11]](function(){return _0xf7a2x7[_0x6bed[19]](204)})[_0x6bed[8]](sequelize.ForeignKeyConstraintError,function(_0xf7a2x9){_0xf7a2x9[_0x6bed[41]]= _0x6bed[42];_0xf7a2x9[_0x6bed[43]]= _0x6bed[44];return handleError(_0xf7a2x7,_0xf7a2x9)})[_0x6bed[8]](function(_0xf7a2x9){return handleError(_0xf7a2x7,_0xf7a2x9)})};exports[_0x6bed[45]]= function(_0xf7a2x6,_0xf7a2x7){return sequelize[_0x6bed[33]](function(_0xf7a2xd){return Interval[_0x6bed[30]]({where:{id:_0xf7a2x6[_0x6bed[12]][_0x6bed[46]]},individualHooks:true,transaction:_0xf7a2xd})})[_0x6bed[11]](function(){return _0xf7a2x7[_0x6bed[19]](204)})[_0x6bed[8]](sequelize.ForeignKeyConstraintError,function(_0xf7a2x9){_0xf7a2x9[_0x6bed[41]]= _0x6bed[42];_0xf7a2x9[_0x6bed[43]]= _0x6bed[44];return handleError(_0xf7a2x7,_0xf7a2x9)})[_0x6bed[8]](function(_0xf7a2x9){return handleError(_0xf7a2x7,_0xf7a2x9)})};function handleError(_0xf7a2x7,_0xf7a2x9){return _0xf7a2x7[_0x6bed[10]](500)[_0x6bed[9]](_0xf7a2x9)}
\ No newline at end of file
+var _0xfa7c=["\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","\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","\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"];_0xfa7c[0];var _=require(_0xfa7c[1]);var Interval=require(_0xfa7c[3])[_0xfa7c[2]];var VoiceExtension=require(_0xfa7c[3])[_0xfa7c[4]];var sequelize=require(_0xfa7c[3])[_0xfa7c[5]];var Util=require(_0xfa7c[6]);exports[_0xfa7c[7]]= function(_0x62f0x6,_0x62f0x7,_0x62f0x8){return Interval[_0xfa7c[17]](_0xfa7c[15],_0xfa7c[16])[_0xfa7c[14]](Util[_0xfa7c[13]](_0x62f0x6[_0xfa7c[12]]))[_0xfa7c[11]](function(_0x62f0xa){_0x62f0x7[_0xfa7c[10]](200)[_0xfa7c[9]](_0x62f0xa)})[_0xfa7c[8]](function(_0x62f0x9){return handleError(_0x62f0x7,_0x62f0x9)})};exports[_0xfa7c[18]]= function(_0x62f0x6,_0x62f0x7){return Interval[_0xfa7c[17]](_0xfa7c[16])[_0xfa7c[22]](_0x62f0x6[_0xfa7c[21]][_0xfa7c[20]])[_0xfa7c[11]](function(_0x62f0xb){if(!_0x62f0xb){return _0x62f0x7[_0xfa7c[19]](404)};return _0x62f0x7[_0xfa7c[9]](_0x62f0xb)})[_0xfa7c[8]](function(_0x62f0x9){return handleError(_0x62f0x7,_0x62f0x9)})};exports[_0xfa7c[23]]= function(_0x62f0x6,_0x62f0x7){return Interval[_0xfa7c[17]](_0xfa7c[16])[_0xfa7c[23]](_0x62f0x6[_0xfa7c[25]])[_0xfa7c[11]](function(_0x62f0xb){return _0x62f0x7[_0xfa7c[10]](201)[_0xfa7c[9]](_0x62f0xb)})[_0xfa7c[8]](function(_0x62f0x9){console[_0xfa7c[24]](_0x62f0x9);return handleError(_0x62f0x7,_0x62f0x9)})};exports[_0xfa7c[26]]= function(_0x62f0x6,_0x62f0x7){var _0x62f0xc;return sequelize[_0xfa7c[33]](function(_0x62f0xd){if(_0x62f0x6[_0xfa7c[25]][_0xfa7c[20]]){delete _0x62f0x6[_0xfa7c[25]][_0xfa7c[20]]};return Interval[_0xfa7c[17]](_0xfa7c[16])[_0xfa7c[22]](_0x62f0x6[_0xfa7c[21]][_0xfa7c[20]])[_0xfa7c[11]](function(_0x62f0xb){if(!_0x62f0xb){return _0x62f0x7[_0xfa7c[19]](404)};_0x62f0xc= _[_0xfa7c[31]](_0x62f0xb);return _0x62f0xb[_0xfa7c[32]](_0x62f0x6[_0xfa7c[25]],{transaction:_0x62f0xd})})[_0xfa7c[11]](function(){if(_0x62f0x6[_0xfa7c[25]][_0xfa7c[28]]&& !_0x62f0x6[_0xfa7c[25]][_0xfa7c[28]][_0xfa7c[29]]){return Interval[_0xfa7c[30]]({where:{IntervalId:_0x62f0x6[_0xfa7c[21]][_0xfa7c[20]]},transaction:_0x62f0xd})}else {if(_0x62f0x6[_0xfa7c[25]][_0xfa7c[28]]&& _0x62f0x6[_0xfa7c[25]][_0xfa7c[28]][_0xfa7c[29]]){return bulkCreateSubIntervals(_0x62f0x6[_0xfa7c[25]].SubIntervals,_0x62f0xc,_0x62f0xd)}}})[_0xfa7c[27]]()})[_0xfa7c[11]](function(){return _0x62f0x7[_0xfa7c[19]](200)})[_0xfa7c[8]](function(_0x62f0x9){console[_0xfa7c[24]](_0x62f0x9);return handleError(_0x62f0x7,_0x62f0x9)})};function bulkCreateSubIntervals(_0x62f0xf,_0x62f0xc,_0x62f0xd){var _0x62f0x10=[];var _0x62f0x11=_[_0xfa7c[35]](_0x62f0xc.SubIntervals,_0xfa7c[34]);var _0x62f0x12;_[_0xfa7c[40]](_0x62f0x11,function(_0x62f0x13,_0x62f0x14){_0x62f0x12= _[_0xfa7c[36]](_0x62f0xf,{id:_0x62f0x13[_0xfa7c[20]]});if(_0x62f0x12){_0x62f0x12[_0xfa7c[37]]= _0x62f0xc[_0xfa7c[20]];_0x62f0x10[_0xfa7c[38]](Interval[_0xfa7c[26]](_[_0xfa7c[31]](_0x62f0x12),{where:{id:_0x62f0x13[_0xfa7c[20]]},transaction:_0x62f0xd,individualHooks:true}));_[_0xfa7c[39]](_0x62f0xf,{id:_0x62f0x13[_0xfa7c[20]]})}else {_0x62f0x10[_0xfa7c[38]](Interval[_0xfa7c[30]]({where:{id:_0x62f0x13[_0xfa7c[20]]},transaction:_0x62f0xd}))}});_[_0xfa7c[40]](_0x62f0xf,function(_0x62f0x13){_0x62f0x13[_0xfa7c[37]]= _0x62f0xc[_0xfa7c[20]];_0x62f0x10[_0xfa7c[38]](Interval[_0xfa7c[23]](_0x62f0x13,{transaction:_0x62f0xd}))});return _0x62f0x10}exports[_0xfa7c[30]]= function(_0x62f0x6,_0x62f0x7){return sequelize[_0xfa7c[33]](function(_0x62f0xd){return Interval[_0xfa7c[30]]({where:{id:_0x62f0x6[_0xfa7c[21]][_0xfa7c[20]]},individualHooks:true,transaction:_0x62f0xd})})[_0xfa7c[11]](function(){return _0x62f0x7[_0xfa7c[19]](204)})[_0xfa7c[8]](sequelize.ForeignKeyConstraintError,function(_0x62f0x9){_0x62f0x9[_0xfa7c[41]]= _0xfa7c[42];_0x62f0x9[_0xfa7c[43]]= _0xfa7c[44];return handleError(_0x62f0x7,_0x62f0x9)})[_0xfa7c[8]](function(_0x62f0x9){return handleError(_0x62f0x7,_0x62f0x9)})};exports[_0xfa7c[45]]= function(_0x62f0x6,_0x62f0x7){return sequelize[_0xfa7c[33]](function(_0x62f0xd){return Interval[_0xfa7c[30]]({where:{id:_0x62f0x6[_0xfa7c[12]][_0xfa7c[46]]},individualHooks:true,transaction:_0x62f0xd})})[_0xfa7c[11]](function(){return _0x62f0x7[_0xfa7c[19]](204)})[_0xfa7c[8]](sequelize.ForeignKeyConstraintError,function(_0x62f0x9){_0x62f0x9[_0xfa7c[41]]= _0xfa7c[42];_0x62f0x9[_0xfa7c[43]]= _0xfa7c[44];return handleError(_0x62f0x7,_0x62f0x9)})[_0xfa7c[8]](function(_0x62f0x9){return handleError(_0x62f0x7,_0x62f0x9)})};function handleError(_0x62f0x7,_0x62f0x9){return _0x62f0x7[_0xfa7c[10]](500)[_0xfa7c[9]](_0x62f0x9)}
\ No newline at end of file