Skip to content
This repository has been archived by the owner on Aug 10, 2021. It is now read-only.

Commit

Permalink
Fixed an error where invalid request would corrupt database
Browse files Browse the repository at this point in the history
  • Loading branch information
Qizot committed Mar 21, 2020
1 parent 675b811 commit ff5a0fa
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ export const refreshTimelinesJob = async () => {
try {
const response = await fetch(url);
const body = await response.json();
if (response.status != 200) {
console.log(body);
continue;
}
const timeline = await VirusTimelineSchema.findOne({code: countries[key]});
if (timeline) {

Expand Down

0 comments on commit ff5a0fa

Please sign in to comment.