File tree Expand file tree Collapse file tree
specifyweb/frontend/js_src/lib/components/InitialContext Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,19 +13,13 @@ type StatsCounts = {
1313const stats2RequestIntervalMs = 24 * 60 * 60 * 1000 ;
1414const stats2RequestKeyPrefix = 'specify7-stats2-last-request' ;
1515const stats2RequestTimeoutMs = 5000 ;
16+ const stats2LambdaFunctionUrl = 'https://hvf3gvyu6q3f3mkf6y5xlddstq0xmuel.lambda-url.us-east-1.on.aws/' ;
1617
1718function buildStatsLambdaUrl ( base : string | null | undefined ) : string | null {
1819 if ( ! base ) return null ;
1920 let u = base . trim ( ) ;
2021
2122 if ( ! / ^ h t t p s ? : \/ \/ / i. test ( u ) ) u = `https://${ u } ` ;
22-
23- const hasRoute = / \/ ( p r o d | d e f a u l t ) \/ [ ^ \s / ] + / . test ( u ) ;
24- if ( ! hasRoute ) {
25- const stage = 'prod' ;
26- const route = 'AggrgatedSp7Stats' ;
27- u = `${ u . replace ( / \/ $ / , '' ) } /${ stage } /${ route } ` ;
28- }
2923 return u ;
3024}
3125
@@ -123,7 +117,7 @@ export const fetchContext = fetchSystemInfo.then(async (systemInfo) => {
123117 { errorMode : 'silent' }
124118 ) . catch ( softFail ) ;
125119
126- const lambdaUrl = buildStatsLambdaUrl ( systemInfo . stats_2_url ) ;
120+ const lambdaUrl = buildStatsLambdaUrl ( stats2LambdaFunctionUrl ) ;
127121 if ( lambdaUrl ) {
128122 const storageKey = buildStats2RequestKey (
129123 lambdaUrl ,
You can’t perform that action at this time.
0 commit comments