fix(code): remove duplicated code BE-11821 (#667)

pull/6081/merge
andres-portainer 2025-04-18 17:34:34 -03:00 committed by GitHub
parent 01afe34df7
commit 6fcf1893d3
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ func WithItem[TId ~int, TObject any](getter ItemGetter[TId, TObject], idParam st
}
}
func FetchItem[T any](request *http.Request, contextKey string) (*T, error) {
func FetchItem[T any](request *http.Request, contextKey ItemContextKey) (*T, error) {
contextData := request.Context().Value(contextKey)
if contextData == nil {
return nil, errors.New("unable to find item in request context")