Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
feat: add ph as the default country
  • Loading branch information
jkga committed Dec 28, 2020
commit 14df780a82fcd8dc8f6c69eca33e3195c4ef282e
4 changes: 2 additions & 2 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@ app.get('/history/charts/:country/:chartSize(sm|md|lg)?', async (req, res, next)


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