Skip to content

Commit 338a3b7

Browse files
committed
Revert "Add memoization for redirection"
This reverts commit f18225b.
1 parent f18225b commit 338a3b7

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed
Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { Router } from 'express';
2-
import memoizee from 'memoizee';
32

43
import { EnvVars } from '../config';
54

@@ -9,18 +8,14 @@ export const addTempleAdsRedirection = (
98
isMisesVariable: boolean,
109
templeAdsPathMainPart = path
1110
) => {
12-
const getRedirectionUrl = memoizee(
13-
(extVersion: string, isMisesBrowser: boolean) =>
14-
`${EnvVars.TEMPLE_ADS_API_URL}/v1/api/ads-rules/${extVersion}${templeAdsPathMainPart}${
15-
isMisesVariable ? (isMisesBrowser ? '/mises' : '/no-mises') : ''
16-
}`,
17-
{ max: 1000, normalizer: args => JSON.stringify(args) }
18-
);
19-
2011
router.get(path, (req, res) => {
2112
const { extVersion: rawExtVersion, isMisesBrowser: rawIsMisesBrowser } = req.query;
2213
const extVersion = typeof rawExtVersion === 'string' ? rawExtVersion : '0.0.0';
2314
const isMisesBrowser = rawIsMisesBrowser === 'true';
24-
res.redirect(getRedirectionUrl(extVersion, isMisesBrowser));
15+
res.redirect(
16+
`${EnvVars.TEMPLE_ADS_API_URL}/v1/api/ads-rules/${extVersion}${templeAdsPathMainPart}${
17+
isMisesVariable ? (isMisesBrowser ? '/mises' : '/no-mises') : ''
18+
}`
19+
);
2520
});
2621
};

0 commit comments

Comments
 (0)