Skip to content

Commit fcc77d1

Browse files
committed
refactor(purchase): use URL/searchParams only for purchase query merge
1 parent 997cd1e commit fcc77d1

1 file changed

Lines changed: 1 addition & 11 deletions

File tree

frontend/src/views/user/PurchaseSubscriptionView.vue

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -117,17 +117,7 @@ function buildPurchaseUrl(
117117
url.searchParams.set(PURCHASE_UI_MODE_QUERY_KEY, PURCHASE_UI_MODE_EMBEDDED)
118118
return url.toString()
119119
} catch {
120-
const params: string[] = []
121-
if (userId) {
122-
params.push(`${PURCHASE_USER_ID_QUERY_KEY}=${encodeURIComponent(String(userId))}`)
123-
}
124-
if (authToken) {
125-
params.push(`${PURCHASE_AUTH_TOKEN_QUERY_KEY}=${encodeURIComponent(authToken)}`)
126-
}
127-
params.push(`${PURCHASE_THEME_QUERY_KEY}=${encodeURIComponent(theme)}`)
128-
params.push(`${PURCHASE_UI_MODE_QUERY_KEY}=${encodeURIComponent(PURCHASE_UI_MODE_EMBEDDED)}`)
129-
const separator = baseUrl.includes('?') ? '&' : '?'
130-
return `${baseUrl}${separator}${params.join('&')}`
120+
return baseUrl
131121
}
132122
}
133123

0 commit comments

Comments
 (0)