Skip to content

Commit 2ab34cf

Browse files
authored
Merge pull request #1 from jonah-butler/extending-route-params
Route params feature added for more fine tuned results
2 parents 16a86ad + fad8987 commit 2ab34cf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

routes/en.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@ router.get("/", function (req, res) {
2020
res.header("Strict-Transport-Security", "max-age=63072000");
2121
res.setHeader("Content-Type", "application/json");
2222

23+
const partOfSpeech = req.query.type;
24+
2325
axios({
2426
method: "GET",
25-
url: "https://randomword.com/",
27+
url: partOfSpeech ? `https://randomword.com/${partOfSpeech}` : `https://randomword.com`,
2628
headers: {
2729
"User-Agent": rua,
2830
},

0 commit comments

Comments
 (0)