임승현

Edit To Save the Information

...@@ -13,19 +13,22 @@ let kakaoOptions = { ...@@ -13,19 +13,22 @@ let kakaoOptions = {
13 qs: { 13 qs: {
14 'query': 'CGV 광명', 14 'query': 'CGV 광명',
15 //'category_group_code' : 'CT1', 15 //'category_group_code' : 'CT1',
16 - 'size' : 5 16 + 'size' : 10
17 }, 17 },
18 encoding : 'UTF-8' 18 encoding : 'UTF-8'
19 -} 19 +};
20 20
21 request(kakaoOptions, function (err, res, body) { 21 request(kakaoOptions, function (err, res, body) {
22 - theater_list = JSON.parse(body).documents; 22 + info_list = JSON.parse(body).documents;
23 + let selectable_theaters = [];
23 if(!err && res.statusCode == 200){ 24 if(!err && res.statusCode == 200){
24 - theater_list.forEach(info => { 25 + info_list.forEach(info => {
25 - if(info.category_name.endsWith("CJCGV")) 26 + if(info.category_name.endsWith("CGV")){
27 + selectable_theaters.push(info.place_name);
26 console.log(info.place_name + " : " + info.place_url); 28 console.log(info.place_name + " : " + info.place_url);
29 + }
27 }); 30 });
28 } 31 }
29 -}) 32 +});
30 33
31 module.exports = router; 34 module.exports = router;
...\ No newline at end of file ...\ No newline at end of file
......