Skip to content

Commit 36aff99

Browse files
committed
added changelog, changed package to 0.8.0
1 parent ab4cb79 commit 36aff99

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

app.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,14 @@ app.get('/updates', (req, res) => {
7575
}).catch(error => errorHandler(error, res));
7676
});
7777

78-
app.get('/:country/graph', (req, res) => {
78+
app.get(['/:country/graph', '/graph'], (req, res) => {
7979
const { country } = req.params;
8080
const isCurl = IS_CURL_RE.test(req.headers['user-agent']);
81-
console.log(country);
81+
if (!country) {
82+
return getGraph({ isCurl })
83+
.then(result => res.send(result))
84+
.catch(error => errorHandler(error, res));
85+
}
8286
const lookupObj = lookupCountry(country);
8387

8488
if (!lookupObj) {

changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## Version 0.8.0
4+
5+
* Added confirmed cases graphs ``corona -g`` or ``corona italy -g`
6+
37
## Version 0.7.0
48

59
* Added new source to fetch realtime data. ``corona --source=2``

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "coronavirus-tracker-cli",
3-
"version": "0.7.0",
3+
"version": "0.8.0",
44
"description": "track conronavirus cases from cli",
55
"repository": {
66
"type": "git",

0 commit comments

Comments
 (0)