Skip to content

Commit a360348

Browse files
committed
fix readme and export slasHelpers correctly
1 parent c3f08c8 commit a360348

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,10 @@ async function getGuestUserAuthToken(): Promise<ShopperLoginTypes.TokenResponse>
137137
}
138138

139139
// Alternatively you may use the SLAS helper functions to generate JWT/access token
140-
const guestTokenResponse = await slasHelpers.loginGuestUser(
141-
new ShopperLogin(config),
142-
{ redirectURI: 'http://localhost:3000/callback' }
143-
)
140+
const guestTokenResponse = await slasHelpers.loginGuestUser({
141+
slasClient: new ShopperLogin(config),
142+
parameters: { redirectURI: 'http://localhost:3000/callback' }
143+
})
144144
.then((guestTokenResponse) => {
145145
console.log("Guest Token Response: ", guestTokenResponse);
146146
return guestTokenResponse;

templates/index.ts.hbs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,5 @@ import type * as {{apiName}}Types from "./{{directoryName}}";
44
export type { {{apiName}}Types };
55
{{/each}}
66

7-
import * as helpers from "./helpers";
8-
export { helpers };
9-
7+
export { helpers, slasHelpers } from "./helpers";
108
export { ClientConfig, CommonParameters, sdkLogger } from "@commerce-apps/core"

0 commit comments

Comments
 (0)