diff options
author | Runxi Yu <me@runxiyu.org> | 2025-04-05 20:52:04 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-04-05 20:52:04 +0800 |
commit | b4b0d966340ad9c892f8b8912eebc6118eed7482 (patch) | |
tree | 0512a6dd5cfc21fbd91a07d31f972aa2a1cf844d /http_handle_repo_contrib_index.go | |
parent | git2c: git2c.go -> client.go, a more sensible name (diff) | |
download | forge-b4b0d966340ad9c892f8b8912eebc6118eed7482.tar.gz forge-b4b0d966340ad9c892f8b8912eebc6118eed7482.tar.zst forge-b4b0d966340ad9c892f8b8912eebc6118eed7482.zip |
Use cmd/forge for the entry point
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 { |