Suyeon Jung

Add grade component

...@@ -235,7 +235,7 @@ router.get('/food', function(req, res) { ...@@ -235,7 +235,7 @@ router.get('/food', function(req, res) {
235 fast_food_stores.push(fast_food_store); 235 fast_food_stores.push(fast_food_store);
236 } 236 }
237 } 237 }
238 - res.render('result', { category: 'food', stores: stores, fast_food_stores: fast_food_stores, userLocation: userLocation }); 238 + res.render('result', { category: 'food', stores: stores, fast_food_stores: fast_food_stores, userLocation: userLocation, grade: 'A' });
239 } 239 }
240 240
241 }) 241 })
...@@ -280,7 +280,7 @@ router.get('/school', function(req, res) { ...@@ -280,7 +280,7 @@ router.get('/school', function(req, res) {
280 institutes.push(institute); 280 institutes.push(institute);
281 } 281 }
282 } 282 }
283 - res.render('result', { category: 'school', librarys: librarys, institutes: institutes, userLocation: userLocation }); 283 + res.render('result', { category: 'school', librarys: librarys, institutes: institutes, userLocation: userLocation, grade: 'A' });
284 } 284 }
285 }) 285 })
286 } 286 }
...@@ -306,7 +306,7 @@ router.get('/park', function(req, res) { ...@@ -306,7 +306,7 @@ router.get('/park', function(req, res) {
306 city_parks.push(city_park); 306 city_parks.push(city_park);
307 } 307 }
308 } 308 }
309 - res.render('result', { category: 'park', city_parks: city_parks, userLocation: userLocation }); 309 + res.render('result', { category: 'park', city_parks: city_parks, userLocation: userLocation, grade: 'A' });
310 } 310 }
311 }) 311 })
312 }); 312 });
...@@ -329,7 +329,7 @@ router.get('/transport', function(req, res) { ...@@ -329,7 +329,7 @@ router.get('/transport', function(req, res) {
329 if (!err && res.statusCode == 200) { 329 if (!err && res.statusCode == 200) {
330 //console.log("inside"); 330 //console.log("inside");
331 let bus_result = JSON.parse(body); 331 let bus_result = JSON.parse(body);
332 - console.log('bus_result', bus_result.result.station); 332 + // console.log('bus_result', bus_result.result.station);
333 let busStations = []; 333 let busStations = [];
334 console.log(bus_result.result) 334 console.log(bus_result.result)
335 for (let i = 0; i < bus_result.result.station.length; i++) { 335 for (let i = 0; i < bus_result.result.station.length; i++) {
...@@ -352,7 +352,7 @@ router.get('/transport', function(req, res) { ...@@ -352,7 +352,7 @@ router.get('/transport', function(req, res) {
352 } 352 }
353 console.log(busStations); 353 console.log(busStations);
354 console.log('subwayStaions', subwayStations); 354 console.log('subwayStaions', subwayStations);
355 - res.render('result', { category: 'transport', busStations: busStations, subwayStations: subwayStations, userLocation: userLocation }) 355 + res.render('result', { category: 'transport', busStations: busStations, subwayStations: subwayStations, userLocation: userLocation, grade: 'A' })
356 } 356 }
357 }) 357 })
358 358
...@@ -395,7 +395,7 @@ router.get('/safe', function(req, res) { ...@@ -395,7 +395,7 @@ router.get('/safe', function(req, res) {
395 lights.push(light); 395 lights.push(light);
396 } 396 }
397 } 397 }
398 - res.render('result', { category: 'safe', cctvs: cctvs, lights: lights, userLocation: userLocation }); 398 + res.render('result', { category: 'safe', cctvs: cctvs, lights: lights, userLocation: userLocation, grade: 'A' });
399 } 399 }
400 }) 400 })
401 } 401 }
...@@ -423,7 +423,7 @@ router.get('/culture', function(req, res) { ...@@ -423,7 +423,7 @@ router.get('/culture', function(req, res) {
423 movies.push(movie); 423 movies.push(movie);
424 } 424 }
425 } 425 }
426 - res.render('result', { category: 'culture', movies: movies, userLocation: userLocation }); 426 + res.render('result', { category: 'culture', movies: movies, userLocation: userLocation, grade: 'A' });
427 } 427 }
428 }); 428 });
429 }); 429 });
...@@ -448,7 +448,7 @@ router.get('/shop', function(req, res) { ...@@ -448,7 +448,7 @@ router.get('/shop', function(req, res) {
448 shops.push(shop); 448 shops.push(shop);
449 } 449 }
450 } 450 }
451 - res.render('result', { category: 'shop', shops: shops, userLocation: userLocation }); 451 + res.render('result', { category: 'shop', shops: shops, userLocation: userLocation, grade: 'A' });
452 } 452 }
453 453
454 }) 454 })
...@@ -473,7 +473,7 @@ router.get('/gym', function(req, res) { ...@@ -473,7 +473,7 @@ router.get('/gym', function(req, res) {
473 gyms.push(gym); 473 gyms.push(gym);
474 } 474 }
475 } 475 }
476 - res.render('result', { category: 'gym', gyms: gyms, userLocation: userLocation }); 476 + res.render('result', { category: 'gym', gyms: gyms, userLocation: userLocation, grade: 'A' });
477 } 477 }
478 }) 478 })
479 }); 479 });
......
1 +<div class="alert alert-danger" role="alert">
2 + <%=grade%>
3 +</div>
...\ No newline at end of file ...\ No newline at end of file
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
15 <body> 15 <body>
16 <%- include('components/locationJumbotron') -%> 16 <%- include('components/locationJumbotron') -%>
17 <%- include(`results/${category}`) -%> 17 <%- include(`results/${category}`) -%>
18 + <%- include(`components/grade`) -%>
18 19
19 </body> 20 </body>
20 21
......