Skip to content

Commit

Permalink
Small bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
stijndcl committed Aug 10, 2023
1 parent b9a30c0 commit 2f5b296
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion manifests.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,5 +283,5 @@ type ExportManifestResponse struct {
type UpdateManifestResponse struct {
AppId string `json:"app_id,omitempty"`
PermissionsUpdated bool `json:"permissions_updated,omitempty"`
SlackResponse
ManifestResponse
}
6 changes: 6 additions & 0 deletions tokens.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ func (api *Client) RotateTokensContext(ctx context.Context, configToken string,
return response, response.Err()
}

// UpdateConfigTokens replaces the configuration tokens in the client with those returned by the API
func (api *Client) UpdateConfigTokens(response *TokenResponse) {
api.configToken = response.Token
api.configRefreshToken = response.RefreshToken
}

type TokenResponse struct {
Token string `json:"token,omitempty"`
RefreshToken string `json:"refresh_token,omitempty"`
Expand Down

0 comments on commit 2f5b296

Please # to comment.