-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add workspace querystring #32
Conversation
src/checkout.coffee
Outdated
addWorkspaceQueryString = (url) -> | ||
workspace = urlParam('workspace') | ||
if workspace | ||
if window.location.search.length > 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Não entendi pra que serve esse if
, vc nao deveria ver se na variável url
tem parametros de queryString?
src/checkout.coffee
Outdated
|
||
getGiftCardProviders: () => | ||
@ajax | ||
url: addWorkspaceQueryString(window.location.origin + '/api/checkout/pub/gift-cards/providers') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Criar função privada para pegar a URL como é feito nos outros casos.
src/checkout.coffee
Outdated
@ajax | ||
type: 'POST', | ||
contentType: 'application/json; charset=UTF-8', | ||
url: addWorkspaceQueryString('/api/checkout/pub/orderForms/simulation'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usar função
src/checkout.coffee
Outdated
@@ -417,7 +429,7 @@ class Checkout | |||
clearMessages: (expectedOrderFormSections = @_allOrderFormSections) => | |||
clearMessagesRequest = { expectedOrderFormSections: expectedOrderFormSections } | |||
@ajax | |||
url: @_getOrderFormURL() + '/messages/clear' | |||
url: addWorkspaceQueryString(@_getOrderFormURL() + '/messages/clear') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usar função
src/checkout.coffee
Outdated
@@ -408,7 +420,7 @@ class Checkout | |||
# Sends a request to retrieve the orders for a specific orderGroupId. | |||
getOrders: (orderGroupId) => | |||
@ajax | |||
url: @_getOrdersURL(orderGroupId) | |||
url: addWorkspaceQueryString(@_getOrdersURL(orderGroupId) + workspaceQueryString) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tirar concatenação
What is the purpose of this pull request?
To add workspace querystring on all checkout requests