freeDictionaryAPI icon indicating copy to clipboard operation
freeDictionaryAPI copied to clipboard

Fixed Brazilian Portuguese (pt-BR) language code to fix Issue #115

Open paulorcvieira opened this issue 3 years ago • 0 comments

The value received in let { word, language, version } = req.params in app.js on line 70 is converted to lowercase on line 91 language = language.toLowerCase(); however when checking if this value exists on line 94 if (!utils.isLanguageSupported(language)) { return handleError.call(res, new errors.NoDefinitionsFound()); } is returned false due to the value being in capital letters in modules/utils.js ('pt-BR', // Brazilian Portuguese), thus an error is returned

img1 img2

paulorcvieira avatar Jul 08 '22 14:07 paulorcvieira