diff options
Diffstat (limited to 'http_handle_repo_contrib_one.go')
-rw-r--r-- | http_handle_repo_contrib_one.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/http_handle_repo_contrib_one.go b/http_handle_repo_contrib_one.go index dcd0e0d..0df7491 100644 --- a/http_handle_repo_contrib_one.go +++ b/http_handle_repo_contrib_one.go @@ -14,7 +14,7 @@ import ( // httpHandleRepoContribOne provides an interface to each merge request of a // repo. -func httpHandleRepoContribOne(writer http.ResponseWriter, request *http.Request, params map[string]any) { +func (s *server) httpHandleRepoContribOne(writer http.ResponseWriter, request *http.Request, params map[string]any) { var mrIDStr string var mrIDInt int var err error @@ -33,7 +33,7 @@ func httpHandleRepoContribOne(writer http.ResponseWriter, request *http.Request, } mrIDInt = int(mrIDInt64) - if err = database.QueryRow(request.Context(), + if err = s.database.QueryRow(request.Context(), "SELECT COALESCE(title, ''), status, source_ref, COALESCE(destination_branch, '') FROM merge_requests WHERE repo_id = $1 AND repo_local_id = $2", params["repo_id"], mrIDInt, ).Scan(&title, &status, &srcRefStr, &dstBranchStr); err != nil { |