mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-26 14:32:04 -04:00
#292 [api] add /pronouns-name
This commit is contained in:
parent
0f22481535
commit
eee0e8358e
@ -59,6 +59,9 @@ router.get('/pronouns-name/:pronoun*', handleErrorAsync(async (req, res) => {
|
||||
parsePronouns(loadTsv('pronouns/pronouns')),
|
||||
req.params.pronoun + req.params[0],
|
||||
);
|
||||
if (!pronoun) {
|
||||
return res.status(404).json({error: 'Not found'});
|
||||
}
|
||||
return res.json(pronoun.name());
|
||||
}));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user