김대선

데이터 저장이 안되는 오류 수정

......@@ -15,7 +15,7 @@ const data = require('./functions/dataFunctions')
const find = require('./functions/findFunction')
// 0초 0분 0시 아무날 아무달 아무년
const saveData = schedule.scheduleJob('55 49 19 * * *', data.save)
const saveData = schedule.scheduleJob('55 29 20 * * *', data.save)
var app = express();
app.use(bodyParser.json());
......
......@@ -49,7 +49,6 @@ const save = async()=> {
temp = "companyName : " + i.companyName
string = string + temp + "\n"
}
data = await functions.getNaverFunction()
temp = ""
for(let i of data){
......@@ -62,7 +61,7 @@ const save = async()=> {
temp = "companyName : " + i.companyName
string = string + temp + "\n"
}
data = await functions.getProgrammersFunction()
temp = ""
for(let i of data){
......@@ -75,6 +74,7 @@ const save = async()=> {
temp = "companyName : " + i.companyName
string = string + temp + "\n"
}
const today = new Date()
fs.writeFile(`./datas/${today.getFullYear()}.${today.getMonth()}.${today.getDate()}`, string, 'utf-8', (err)=>{
if(err){
......