김주희

ejs로 데이터 전송 안되는 문제 해결

......@@ -4,8 +4,8 @@ var db = require('../lib/db_total');
/* GET home page. */
router.post('/starting' , (req,res) => {
res.redirect(`/name/${req.body.name}/birth/${req.body.birth}`);
router.post('/starting', (req, res) => {
res.redirect(`/name/${req.body.name}/birth/${req.body.birth}`);
})
router.get('/name/:name/birth/:birth', (req, res) => {
......@@ -23,10 +23,10 @@ router.get('/name/:name/birth/:birth', (req, res) => {
const birth = req.params.birth;
//const address = req.params.address;
////////////////////////////////////////
var deathArr = new Array();
var mhurtArr = new Array();
var lhurtArr = new Array();
var occurArr = new Array();
var tdeathArr = new Array(); //사망자수
var mhurtArr = new Array(); //중상자수
var lhurtArr = new Array(); //경상자수
var occurArr = new Array(); //총 발생수
////////////////////////////////////////
......@@ -48,7 +48,7 @@ router.get('/name/:name/birth/:birth', (req, res) => {
wsArr.unshift(rows[i].wind);
rainArr.unshift(rows[i].rain);
////
deathArr.unshift(rows[i].tdeath);
tdeathArr.unshift(rows[i].tdeath);
mhurtArr.unshift(rows[i].mhurt);
lhurtArr.unshift(rows[i].lhurt);
occurArr.unshift(rows[i].occurence);
......@@ -71,7 +71,7 @@ router.get('/name/:name/birth/:birth', (req, res) => {
dataLen,
name,
birth,
deathArr,
tdeathArr,
mhurtArr,
lhurtArr,
occurArr
......