Showing
1 changed file
with
7 additions
and
6 deletions
... | @@ -30,15 +30,16 @@ router.get('/hospital', function (req, res) { | ... | @@ -30,15 +30,16 @@ router.get('/hospital', function (req, res) { |
30 | if (!err && res.statusCode == 200) { | 30 | if (!err && res.statusCode == 200) { |
31 | let hospital_result = JSON.parse(body); | 31 | let hospital_result = JSON.parse(body); |
32 | let hospitals = []; | 32 | let hospitals = []; |
33 | - for (let i = 0; i < hospital_result.Tbggibllbrm[1].row.length; i++) { | 33 | + for (let i = 0; i < hospital_result.hr[1].row.length; i++) { |
34 | - library = hospital_result.Tbggibllbrm[1].row[i]; | 34 | + hospital = hospital_result.hr[1].row[i]; |
35 | - if (userArea(library, 'REFINE_LOTNO_ADDR', user_target)) { | 35 | + if (userArea(hospital, 'REFINE_LOTNO_ADDR', user_target)) { |
36 | - hospitals.push(library); | 36 | + hospitals.push(hospital); |
37 | } | 37 | } |
38 | } | 38 | } |
39 | - console.log([hospitals); | ||
40 | res.render('result', { category: 'hospital', userLocation: userLocation }); | 39 | res.render('result', { category: 'hospital', userLocation: userLocation }); |
41 | } | 40 | } |
42 | 41 | ||
43 | }) | 42 | }) |
44 | -}); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
43 | +}); | ||
44 | + | ||
45 | +module.exports = router; | ||
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or login to post a comment