김주희

대기오염 api 설정 수정

...@@ -28,6 +28,7 @@ router.get('/name/:name/birth/:birth', (req, res) => { ...@@ -28,6 +28,7 @@ router.get('/name/:name/birth/:birth', (req, res) => {
28 var lhurtArr = new Array(); //경상자수 28 var lhurtArr = new Array(); //경상자수
29 var occurArr = new Array(); //총 발생수 29 var occurArr = new Array(); //총 발생수
30 //////////////////////////////////////// 30 ////////////////////////////////////////
31 + var airArr = new Array(); //대기오염 지수
31 32
32 33
33 // 이전 10분간 데이터 찾기 34 // 이전 10분간 데이터 찾기
...@@ -52,6 +53,8 @@ router.get('/name/:name/birth/:birth', (req, res) => { ...@@ -52,6 +53,8 @@ router.get('/name/:name/birth/:birth', (req, res) => {
52 mhurtArr.unshift(rows[i].mhurt); 53 mhurtArr.unshift(rows[i].mhurt);
53 lhurtArr.unshift(rows[i].lhurt); 54 lhurtArr.unshift(rows[i].lhurt);
54 occurArr.unshift(rows[i].occurence); 55 occurArr.unshift(rows[i].occurence);
56 + ////
57 + airArr.unshift(rows[i].pollution);
55 count = count + 1; 58 count = count + 1;
56 59
57 if (count == 10) { 60 if (count == 10) {
...@@ -74,7 +77,8 @@ router.get('/name/:name/birth/:birth', (req, res) => { ...@@ -74,7 +77,8 @@ router.get('/name/:name/birth/:birth', (req, res) => {
74 tdeathArr, 77 tdeathArr,
75 mhurtArr, 78 mhurtArr,
76 lhurtArr, 79 lhurtArr,
77 - occurArr 80 + occurArr,
81 + airArr
78 }); 82 });
79 } 83 }
80 }); 84 });
......