Skip to content

Commit

Permalink
feat: remove extra '}' typo in get profile URL APIs (#62)
Browse files Browse the repository at this point in the history
* Remove `}` typo in generated user profile urls
* Make accessToken explicitly optional, reflecting
  the actual runtime behavior (typings only, no
  runtime changes).
  • Loading branch information
elierotenberg authored Jun 6, 2024
1 parent 5567e61 commit ac29cfd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/url.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ export class UrlSDK {
return this.getSignUrl('login', redirectUri)
}

public getUserProfileUrl(userName: string, accessToken: string): string {
const param = accessToken ? `?access_token=${accessToken}}` : ''
public getUserProfileUrl(userName: string, accessToken?: string): string {
const param = accessToken ? `?access_token=${accessToken}` : ''
return `${this.config.endpoint}/users/${this.config.orgName}/${userName}${param}`
}

public getMyProfileUrl(accessToken: string): string {
const param = accessToken ? `?access_token=${accessToken}}` : ''
public getMyProfileUrl(accessToken?: string): string {
const param = accessToken ? `?access_token=${accessToken}` : ''
return `${this.config.endpoint}/account${param}`
}
}

0 comments on commit ac29cfd

Please sign in to comment.