Skip to content

Commit

Permalink
Fix: Remove /pt
Browse files Browse the repository at this point in the history
  • Loading branch information
plibither8 committed Dec 10, 2020
1 parent 11d226b commit 9c6c662
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ fastify.get('/:countryCode', (req, reply) => {
let {countryCode} = req.params;
countryCode = countryCode.toLowerCase();

if (countryCode === "pt") {
return reply.send();
}

if (!(countryCode in DATA)) {
reply.status(400);
return reply.send(`<pre>Error 400: country code "${countryCode}" not found.\nGET /list for list of valid country codes.</pre>`);
Expand Down

0 comments on commit 9c6c662

Please sign in to comment.