diff options
Diffstat (limited to 'http_handle_repo_contrib_index.go')
-rw-r--r-- | http_handle_repo_contrib_index.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/http_handle_repo_contrib_index.go b/http_handle_repo_contrib_index.go index e0c8478..f729cbe 100644 --- a/http_handle_repo_contrib_index.go +++ b/http_handle_repo_contrib_index.go @@ -1,7 +1,7 @@ // SPDX-License-Identifier: AGPL-3.0-only // SPDX-FileCopyrightText: Copyright (c) 2025 Runxi Yu <https://runxiyu.org> -package main +package forge import ( "net/http" @@ -18,12 +18,12 @@ type idTitleStatus struct { } // httpHandleRepoContribIndex provides an index to merge requests of a repo. -func (s *server) httpHandleRepoContribIndex(writer http.ResponseWriter, request *http.Request, params map[string]any) { +func (s *Server) httpHandleRepoContribIndex(writer http.ResponseWriter, request *http.Request, params map[string]any) { var rows pgx.Rows var result []idTitleStatus var err error - if rows, err = s.database.Query(request.Context(), + if rows, err = s.Database.Query(request.Context(), "SELECT repo_local_id, COALESCE(title, 'Untitled'), status FROM merge_requests WHERE repo_id = $1", params["repo_id"], ); err != nil { |