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_info.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'http_handle_repo_info.go') diff --git a/http_handle_repo_info.go b/http_handle_repo_info.go index b7b7438..e2080ac 100644 --- a/http_handle_repo_info.go +++ b/http_handle_repo_info.go @@ -1,7 +1,7 @@ // SPDX-License-Identifier: AGPL-3.0-only // SPDX-FileCopyrightText: Copyright (c) 2025 Runxi Yu -package main +package forge import ( "fmt" @@ -16,12 +16,12 @@ import ( // HTTP protocol. // // TODO: Reject access from web browsers. -func (s *server) httpHandleRepoInfo(writer http.ResponseWriter, request *http.Request, params map[string]any) (err error) { +func (s *Server) httpHandleRepoInfo(writer http.ResponseWriter, request *http.Request, params map[string]any) (err error) { groupPath := params["group_path"].([]string) repoName := params["repo_name"].(string) var repoPath string - if err := s.database.QueryRow(request.Context(), ` + if err := s.Database.QueryRow(request.Context(), ` WITH RECURSIVE group_path_cte AS ( -- Start: match the first name in the path where parent_group IS NULL SELECT -- cgit v1.2.3