Skip to content

Commit

Permalink
chore: rename function
Browse files Browse the repository at this point in the history
  • Loading branch information
claustra01 committed Apr 14, 2024
1 parent e5320d7 commit f132fdb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bot/google/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type TokenResponseBody struct {
TokenType string `json:"token_type"`
}

func (c *OAuthClient) GetToken(code string) (string, error) {
func (c *OAuthClient) GetRefreshToken(code string) (string, error) {

reqBody := TokenRequestBody{
ClientId: c.Config.ClientId,
Expand Down
2 changes: 1 addition & 1 deletion bot/handler/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func UpdateRefreshToken(w http.ResponseWriter, req *http.Request) {
client := google.NewOAuthClient(
req.Context(),
)
token, err := client.GetToken(reqBody.AuthCode)
token, err := client.GetRefreshToken(reqBody.AuthCode)
if err != nil {
w.WriteHeader(http.StatusInternalServerError)
_, err := w.Write([]byte(err.Error()))
Expand Down

0 comments on commit f132fdb

Please sign in to comment.