httpapi: Remove unused param (#45721)

This commit is contained in:
Ryan Slade 2022-12-15 18:18:02 +01:00 committed by GitHub
parent 568def690a
commit 3ba7222367
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View File

@ -81,7 +81,7 @@ func NewHandler(
})
// Set handlers for the installed routes.
m.Get(apirouter.RepoShield).Handler(trace.Route(handler(serveRepoShield(db))))
m.Get(apirouter.RepoShield).Handler(trace.Route(handler(serveRepoShield())))
m.Get(apirouter.RepoRefresh).Handler(trace.Route(handler(serveRepoRefresh(db))))
webhookMiddleware := webhooks.NewLogMiddleware(

View File

@ -8,7 +8,6 @@ import (
"github.com/sourcegraph/sourcegraph/cmd/frontend/backend"
"github.com/sourcegraph/sourcegraph/cmd/frontend/internal/routevar"
"github.com/sourcegraph/sourcegraph/internal/database"
"github.com/sourcegraph/sourcegraph/internal/httpcli"
"github.com/sourcegraph/sourcegraph/lib/errors"
)
@ -36,7 +35,7 @@ func badgeValueFmt(totalRefs int) string {
return " " + desc
}
func serveRepoShield(db database.DB) func(http.ResponseWriter, *http.Request) error {
func serveRepoShield() func(http.ResponseWriter, *http.Request) error {
return func(w http.ResponseWriter, r *http.Request) error {
value, err := badgeValue(r)
if err != nil {