Skip to content

Commit 05728cd

Browse files
committed
chore(LicenseManager): refactor to import function
1 parent e0496a7 commit 05728cd

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

  • src/clients/janus/LicenseManager

src/clients/janus/LicenseManager/index.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
import { stringify } from 'qs'
2-
3-
import { RequestConfig, RequestTracingConfig } from '../../../HttpClient'
1+
import { RequestTracingConfig, inflightUrlWithQuery } from '../../../HttpClient'
42
import { JanusClient } from '../JanusClient'
53

64
const TWO_MINUTES_S = 2 * 60
@@ -13,10 +11,6 @@ const routes = {
1311
topbarData: () => `${BASE_URL}/site/pvt/newtopbar`,
1412
}
1513

16-
const inflightKey = ({ baseURL, url, params }: RequestConfig) => {
17-
return baseURL! + url! + stringify(params, { arrayFormat: 'repeat', addQueryPrefix: true })
18-
}
19-
2014
export class LicenseManager extends JanusClient {
2115
public getAccountData(VtexIdclientAutCookie: string, tracingConfig?: RequestTracingConfig) {
2216
const metric = 'lm-account-data'
@@ -25,7 +19,7 @@ export class LicenseManager extends JanusClient {
2519
headers: {
2620
VtexIdclientAutCookie,
2721
},
28-
inflightKey,
22+
inflightKey: inflightUrlWithQuery,
2923
metric,
3024
tracing: {
3125
requestSpanNameSuffix: metric,

0 commit comments

Comments
 (0)