Built motion from commit ec3309576.|1.0.33
[motion.git] / server / api / metric / metric.controller.js
index ae6405d..2e88890 100644 (file)
@@ -1 +1 @@
-var _0x3797=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x4D\x65\x74\x72\x69\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x75\x74\x69\x6C","\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","\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","\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","\x67\x65\x74\x4D\x65\x74\x72\x69\x63\x73\x42\x79\x54\x61\x62\x6C\x65","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x6C\x65\x6E\x67\x74\x68","\x74\x61\x62\x6C\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\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\x4D\x45\x54\x52\x49\x43","\x6D\x65\x73\x73\x61\x67\x65","\x41\x20\x4D\x65\x74\x72\x69\x63\x20\x77\x69\x74\x68\x20\x74\x68\x61\x74\x20\x6E\x61\x6D\x65\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x65\x78\x69\x73\x74\x73","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72"];_0x3797[0];var _=require(_0x3797[1]);var Metric=require(_0x3797[3])[_0x3797[2]];var util=require(_0x3797[4]);var Util=require(_0x3797[5]);var sequelize=require(_0x3797[3])[_0x3797[6]];var logger=require(_0x3797[8])(_0x3797[7]);exports[_0x3797[9]]= function(_0x915ex7,_0x915ex8,_0x915ex9){return Metric[_0x3797[16]](Util[_0x3797[15]](_0x915ex7[_0x3797[14]]))[_0x3797[13]](function(_0x915exb){return _0x915ex8[_0x3797[12]](200)[_0x3797[11]](_0x915exb)})[_0x3797[10]](function(_0x915exa){return handleError(_0x915ex8,_0x915exa)})};exports[_0x3797[17]]= function(_0x915ex7,_0x915ex8){return Metric[_0x3797[21]]({where:{table:_0x915ex7[_0x3797[14]][_0x3797[20]]}})[_0x3797[13]](function(_0x915exc){if(!_0x915exc){return _0x915ex8[_0x3797[18]](404)};return _0x915ex8[_0x3797[12]](200)[_0x3797[11]]({count:_0x915exc[_0x3797[19]],rows:_0x915exc})})[_0x3797[10]](function(_0x915exa){return handleError(_0x915ex8,_0x915exa)})};exports[_0x3797[22]]= function(_0x915ex7,_0x915ex8){return Metric[_0x3797[25]](_0x915ex7[_0x3797[24]][_0x3797[23]])[_0x3797[13]](function(_0x915exd){if(!_0x915exd){return _0x915ex8[_0x3797[18]](404)};return _0x915ex8[_0x3797[11]](_0x915exd)})[_0x3797[10]](function(_0x915exa){return handleError(_0x915ex8,_0x915exa)})};exports[_0x3797[26]]= function(_0x915ex7,_0x915ex8){return Metric[_0x3797[26]](_0x915ex7[_0x3797[31]])[_0x3797[13]](function(_0x915exd){return _0x915ex8[_0x3797[12]](201)[_0x3797[11]](_0x915exd)})[_0x3797[10]](sequelize.UniqueConstraintError,function(_0x915exa){_0x915exa[_0x3797[27]]= _0x3797[28];_0x915exa[_0x3797[29]]= _0x3797[30];return _0x915ex8[_0x3797[12]](500)[_0x3797[11]](_0x915exa)})[_0x3797[10]](function(_0x915exa){return handleError(_0x915ex8,_0x915exa)})};exports[_0x3797[32]]= function(_0x915ex7,_0x915ex8){return Metric[_0x3797[25]](_0x915ex7[_0x3797[24]][_0x3797[23]])[_0x3797[13]](function(_0x915exd){if(!_0x915exd){return _0x915ex8[_0x3797[18]](404)};var _0x915exe=_[_0x3797[33]](_0x915exd,_0x915ex7[_0x3797[31]]);return _0x915exe[_0x3797[34]]()})[_0x3797[13]](function(){return _0x915ex8[_0x3797[18]](200)})[_0x3797[10]](sequelize.UniqueConstraintError,function(_0x915exa){_0x915exa[_0x3797[27]]= _0x3797[28];_0x915exa[_0x3797[29]]= _0x3797[30];return _0x915ex8[_0x3797[12]](500)[_0x3797[11]](_0x915exa)})[_0x3797[10]](function(_0x915exa){return handleError(_0x915ex8,_0x915exa)})};exports[_0x3797[35]]= function(_0x915ex7,_0x915ex8){return Metric[_0x3797[25]](_0x915ex7[_0x3797[24]][_0x3797[23]])[_0x3797[13]](function(_0x915exd){if(!_0x915exd){return _0x915ex8[_0x3797[18]](404)};return _0x915exd[_0x3797[35]]()})[_0x3797[13]](function(){return _0x915ex8[_0x3797[18]](204)})[_0x3797[10]](function(_0x915exa){return handleError(_0x915ex8,_0x915exa)})};exports[_0x3797[36]]= function(_0x915ex7,_0x915ex8){return Metric[_0x3797[35]]({where:{id:_0x915ex7[_0x3797[14]][_0x3797[37]]},individualHooks:true})[_0x3797[13]](function(){return _0x915ex8[_0x3797[18]](204)})[_0x3797[10]](function(_0x915exa){return handleError(_0x915ex8,_0x915exa)})};function handleError(_0x915ex8,_0x915exa){logger[_0x3797[39]](_0x915exa[_0x3797[38]]);return _0x915ex8[_0x3797[12]](500)[_0x3797[11]](_0x915exa)}
\ No newline at end of file
+var _0x75e4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x4D\x65\x74\x72\x69\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x75\x74\x69\x6C","\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","\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","\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","\x67\x65\x74\x4D\x65\x74\x72\x69\x63\x73\x42\x79\x54\x61\x62\x6C\x65","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x6C\x65\x6E\x67\x74\x68","\x74\x61\x62\x6C\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\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\x4D\x45\x54\x52\x49\x43","\x6D\x65\x73\x73\x61\x67\x65","\x41\x20\x4D\x65\x74\x72\x69\x63\x20\x77\x69\x74\x68\x20\x74\x68\x61\x74\x20\x6E\x61\x6D\x65\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x65\x78\x69\x73\x74\x73","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72"];_0x75e4[0];var _=require(_0x75e4[1]);var Metric=require(_0x75e4[3])[_0x75e4[2]];var util=require(_0x75e4[4]);var Util=require(_0x75e4[5]);var sequelize=require(_0x75e4[3])[_0x75e4[6]];var logger=require(_0x75e4[8])(_0x75e4[7]);exports[_0x75e4[9]]= function(_0x66f1x7,_0x66f1x8,_0x66f1x9){return Metric[_0x75e4[16]](Util[_0x75e4[15]](_0x66f1x7[_0x75e4[14]]))[_0x75e4[13]](function(_0x66f1xb){return _0x66f1x8[_0x75e4[12]](200)[_0x75e4[11]](_0x66f1xb)})[_0x75e4[10]](function(_0x66f1xa){return handleError(_0x66f1x8,_0x66f1xa)})};exports[_0x75e4[17]]= function(_0x66f1x7,_0x66f1x8){return Metric[_0x75e4[21]]({where:{table:_0x66f1x7[_0x75e4[14]][_0x75e4[20]]}})[_0x75e4[13]](function(_0x66f1xc){if(!_0x66f1xc){return _0x66f1x8[_0x75e4[18]](404)};return _0x66f1x8[_0x75e4[12]](200)[_0x75e4[11]]({count:_0x66f1xc[_0x75e4[19]],rows:_0x66f1xc})})[_0x75e4[10]](function(_0x66f1xa){return handleError(_0x66f1x8,_0x66f1xa)})};exports[_0x75e4[22]]= function(_0x66f1x7,_0x66f1x8){return Metric[_0x75e4[25]](_0x66f1x7[_0x75e4[24]][_0x75e4[23]])[_0x75e4[13]](function(_0x66f1xd){if(!_0x66f1xd){return _0x66f1x8[_0x75e4[18]](404)};return _0x66f1x8[_0x75e4[11]](_0x66f1xd)})[_0x75e4[10]](function(_0x66f1xa){return handleError(_0x66f1x8,_0x66f1xa)})};exports[_0x75e4[26]]= function(_0x66f1x7,_0x66f1x8){return Metric[_0x75e4[26]](_0x66f1x7[_0x75e4[31]])[_0x75e4[13]](function(_0x66f1xd){return _0x66f1x8[_0x75e4[12]](201)[_0x75e4[11]](_0x66f1xd)})[_0x75e4[10]](sequelize.UniqueConstraintError,function(_0x66f1xa){_0x66f1xa[_0x75e4[27]]= _0x75e4[28];_0x66f1xa[_0x75e4[29]]= _0x75e4[30];return _0x66f1x8[_0x75e4[12]](500)[_0x75e4[11]](_0x66f1xa)})[_0x75e4[10]](function(_0x66f1xa){return handleError(_0x66f1x8,_0x66f1xa)})};exports[_0x75e4[32]]= function(_0x66f1x7,_0x66f1x8){return Metric[_0x75e4[25]](_0x66f1x7[_0x75e4[24]][_0x75e4[23]])[_0x75e4[13]](function(_0x66f1xd){if(!_0x66f1xd){return _0x66f1x8[_0x75e4[18]](404)};var _0x66f1xe=_[_0x75e4[33]](_0x66f1xd,_0x66f1x7[_0x75e4[31]]);return _0x66f1xe[_0x75e4[34]]()})[_0x75e4[13]](function(){return _0x66f1x8[_0x75e4[18]](200)})[_0x75e4[10]](sequelize.UniqueConstraintError,function(_0x66f1xa){_0x66f1xa[_0x75e4[27]]= _0x75e4[28];_0x66f1xa[_0x75e4[29]]= _0x75e4[30];return _0x66f1x8[_0x75e4[12]](500)[_0x75e4[11]](_0x66f1xa)})[_0x75e4[10]](function(_0x66f1xa){return handleError(_0x66f1x8,_0x66f1xa)})};exports[_0x75e4[35]]= function(_0x66f1x7,_0x66f1x8){return Metric[_0x75e4[25]](_0x66f1x7[_0x75e4[24]][_0x75e4[23]])[_0x75e4[13]](function(_0x66f1xd){if(!_0x66f1xd){return _0x66f1x8[_0x75e4[18]](404)};return _0x66f1xd[_0x75e4[35]]()})[_0x75e4[13]](function(){return _0x66f1x8[_0x75e4[18]](204)})[_0x75e4[10]](function(_0x66f1xa){return handleError(_0x66f1x8,_0x66f1xa)})};exports[_0x75e4[36]]= function(_0x66f1x7,_0x66f1x8){return Metric[_0x75e4[35]]({where:{id:_0x66f1x7[_0x75e4[14]][_0x75e4[37]]},individualHooks:true})[_0x75e4[13]](function(){return _0x66f1x8[_0x75e4[18]](204)})[_0x75e4[10]](function(_0x66f1xa){return handleError(_0x66f1x8,_0x66f1xa)})};function handleError(_0x66f1x8,_0x66f1xa){logger[_0x75e4[39]](_0x66f1xa[_0x75e4[38]]);return _0x66f1x8[_0x75e4[12]](500)[_0x75e4[11]](_0x66f1xa)}
\ No newline at end of file