Send language when fetching available tasks

This commit is contained in:
AbdBarho
2023-01-22 21:57:21 +01:00
parent b8672e5986
commit 51afea69ec
5 changed files with 28 additions and 10 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ const LOCALE_SET = new Set(i18n.locales);
* the i18n module.
* 3. "en" as a final fallback.
*/
const getUserLanguage = (req: NextApiRequest) => {
const getUserLanguage = (req: NextApiRequest): string => {
const cookieLanguage = req.cookies["NEXT_LOCALE"];
if (cookieLanguage) {
return cookieLanguage;