Skip to content

Commit 14df780

Browse files
committed
feat: add ph as the default country
1 parent 167d59d commit 14df780

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,9 @@ app.get('/history/charts/:country/:chartSize(sm|md|lg)?', async (req, res, next)
156156

157157

158158
// historical chart by country
159-
app.get('/history/web/charts/:country/:chartSize(sm|md|lg)?', async (req, res, next) => {
159+
app.get('/history/web/charts/:country?/:chartSize(sm|md|lg)?', async (req, res, next) => {
160160
const userAgent = req.headers['user-agent'],
161-
countryData = req.params.country,
161+
countryData = req.params.country || 'ph',
162162
chartType = req.params.chartType || 'cases',
163163
chartSize = req.params.chartSize || 'sm',
164164
summary = await axios.get(`${apiBaseURL}/countries/${countryData}`),

0 commit comments

Comments
 (0)