From b4b0d966340ad9c892f8b8912eebc6118eed7482 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sat, 5 Apr 2025 20:52:04 +0800 Subject: Use cmd/forge for the entry point --- http_handle_repo_contrib_one.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'http_handle_repo_contrib_one.go') diff --git a/http_handle_repo_contrib_one.go b/http_handle_repo_contrib_one.go index 0df7491..9a261a4 100644 --- a/http_handle_repo_contrib_one.go +++ b/http_handle_repo_contrib_one.go @@ -1,7 +1,7 @@ // SPDX-License-Identifier: AGPL-3.0-only // SPDX-FileCopyrightText: Copyright (c) 2025 Runxi Yu -package main +package forge import ( "net/http" @@ -14,7 +14,7 @@ import ( // httpHandleRepoContribOne provides an interface to each merge request of a // repo. -func (s *server) 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 (s *server) httpHandleRepoContribOne(writer http.ResponseWriter, request *h } mrIDInt = int(mrIDInt64) - if err = s.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 { -- cgit v1.2.3