From 7b6b47c7c876048310ad939b255155701e7f591a Mon Sep 17 00:00:00 2001 From: Dessalines Date: Fri, 16 Jul 2021 13:52:27 -0400 Subject: [PATCH] Remove unused extra language issue. --- src/server/index.tsx | 16 +++------------- src/shared/interfaces.ts | 3 --- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/src/server/index.tsx b/src/server/index.tsx index 2d2a6624..57c59645 100644 --- a/src/server/index.tsx +++ b/src/server/index.tsx @@ -76,20 +76,10 @@ server.get("/*", async (req, res) => { return res.redirect(`/404?err=${errCode}`); } - let acceptLang = req.headers["accept-language"] - ? req.headers["accept-language"].split(",")[0] - : "en"; - let lang = site.my_user - ? site.my_user.local_user.lang == "browser" - ? acceptLang - : "en" - : acceptLang; - let isoData: IsoData = { path: req.path, site_res: site, routeData, - lang, }; const wrapper = ( @@ -160,9 +150,9 @@ server.listen(Number(port), hostname, () => { console.log(`http://${hostname}:${port}`); }); -function setForwardedHeaders( - headers: IncomingHttpHeaders -): { [key: string]: string } { +function setForwardedHeaders(headers: IncomingHttpHeaders): { + [key: string]: string; +} { let out = { host: headers.host, }; diff --git a/src/shared/interfaces.ts b/src/shared/interfaces.ts index d4477b73..e09f3bd5 100644 --- a/src/shared/interfaces.ts +++ b/src/shared/interfaces.ts @@ -9,9 +9,6 @@ export interface IsoData { path: string; routeData: any[]; site_res: GetSiteResponse; - // Lang and theme - lang: string; - // communities?: ListCommunitiesResponse; } export interface ILemmyConfig {