mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-24 05:05:20 -04:00
(api) fix routes parsing pronouns
introduced in 118ea121dee99dd368d4d8737d3b15c80eb1de88
This commit is contained in:
parent
da63c33e23
commit
3896053a33
@ -86,7 +86,7 @@ router.get('/banner/:pronounName*.png', handleErrorAsync(async (req, res) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const pronoun = buildPronoun(
|
const pronoun = buildPronoun(
|
||||||
parsePronouns(loadTsv(`${__dirname}/../../data/pronouns/pronouns.tsv`)),
|
parsePronouns(global.config, loadTsv(`${__dirname}/../../data/pronouns/pronouns.tsv`)),
|
||||||
pronounName,
|
pronounName,
|
||||||
global.config,
|
global.config,
|
||||||
translator,
|
translator,
|
||||||
|
@ -44,7 +44,7 @@ const addExamples = (pronoun, examples) => {
|
|||||||
const router = Router();
|
const router = Router();
|
||||||
|
|
||||||
router.get('/pronouns', handleErrorAsync(async (req, res) => {
|
router.get('/pronouns', handleErrorAsync(async (req, res) => {
|
||||||
const pronouns = parsePronouns(loadTsv('pronouns/pronouns'));
|
const pronouns = parsePronouns(global.config, loadTsv('pronouns/pronouns'));
|
||||||
for (const pronoun in pronouns) {
|
for (const pronoun in pronouns) {
|
||||||
if (!pronouns.hasOwnProperty(pronoun)) {
|
if (!pronouns.hasOwnProperty(pronoun)) {
|
||||||
continue;
|
continue;
|
||||||
@ -56,7 +56,7 @@ router.get('/pronouns', handleErrorAsync(async (req, res) => {
|
|||||||
|
|
||||||
router.get('/pronouns/:pronoun*', handleErrorAsync(async (req, res) => {
|
router.get('/pronouns/:pronoun*', handleErrorAsync(async (req, res) => {
|
||||||
const pronoun = buildPronoun(
|
const pronoun = buildPronoun(
|
||||||
parsePronouns(loadTsv('pronouns/pronouns')),
|
parsePronouns(global.config, loadTsv('pronouns/pronouns')),
|
||||||
req.params.pronoun + req.params[0],
|
req.params.pronoun + req.params[0],
|
||||||
global.config,
|
global.config,
|
||||||
translator,
|
translator,
|
||||||
@ -70,7 +70,7 @@ router.get('/pronouns/:pronoun*', handleErrorAsync(async (req, res) => {
|
|||||||
|
|
||||||
router.get('/pronouns-name/:pronoun*', handleErrorAsync(async (req, res) => {
|
router.get('/pronouns-name/:pronoun*', handleErrorAsync(async (req, res) => {
|
||||||
const pronoun = buildPronoun(
|
const pronoun = buildPronoun(
|
||||||
parsePronouns(loadTsv('pronouns/pronouns')),
|
parsePronouns(global.config, loadTsv('pronouns/pronouns')),
|
||||||
(req.params.pronoun + req.params[0]).toLowerCase(),
|
(req.params.pronoun + req.params[0]).toLowerCase(),
|
||||||
global.config,
|
global.config,
|
||||||
translator,
|
translator,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user