Skip to content

Commit

Permalink
fixies
Browse files Browse the repository at this point in the history
  • Loading branch information
bartekpacia committed Oct 27, 2024
1 parent 56b661e commit 0b64bb4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion backend/internal/server/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ func (a *App) getDashboard(w http.ResponseWriter, r *http.Request) {
}
}

var dateOfLastUpdate *time.Time = nil
var dateOfLastUpdate *time.Time
if wasFound {
dateOfLastUpdate = &latestBuild.UpdatedAt
}
Expand Down
4 changes: 2 additions & 2 deletions backend/internal/server/webhook/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func (h Handler) Mux() http.Handler {
}

func (h Handler) exchangeCode(ctx context.Context, code string) (userAccessToken string, err error) {
const url = "https://github.com/login/oauth/access_token"
const githubAuthURL = "https://github.com/login/oauth/access_token"

reqBody := map[string]interface{}{
"client_id": h.githubAppClientID,
Expand All @@ -110,7 +110,7 @@ func (h Handler) exchangeCode(ctx context.Context, code string) (userAccessToken
return "", fmt.Errorf("marshalling request body: %w", err)
}

req, err := http.NewRequestWithContext(ctx, http.MethodPost, url, bytes.NewBuffer(reqBodyBytes))
req, err := http.NewRequestWithContext(ctx, http.MethodPost, githubAuthURL, bytes.NewBuffer(reqBodyBytes))
if err != nil {
return "", fmt.Errorf("creating new request: %w", err)
}
Expand Down

0 comments on commit 0b64bb4

Please sign in to comment.