aboutsummaryrefslogtreecommitdiff
path: root/http_handle_group_index.go
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-04-05 21:47:44 +0800
committerRunxi Yu <me@runxiyu.org>2025-04-05 21:47:44 +0800
commitefa6f33b4c67f64a4a8d8cd723b9bbc9494fc735 (patch)
treec4075c78bc4126d764f91ec68931c34281913dcc /http_handle_group_index.go
parentAdd missing copyright headers (diff)
downloadforge-efa6f33b4c67f64a4a8d8cd723b9bbc9494fc735.tar.gz
forge-efa6f33b4c67f64a4a8d8cd723b9bbc9494fc735.tar.zst
forge-efa6f33b4c67f64a4a8d8cd723b9bbc9494fc735.zip
Unexport fields in Serverv0.1.24
Diffstat (limited to 'http_handle_group_index.go')
-rw-r--r--http_handle_group_index.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/http_handle_group_index.go b/http_handle_group_index.go
index 3f6ed68..bb9c94f 100644
--- a/http_handle_group_index.go
+++ b/http_handle_group_index.go
@@ -28,7 +28,7 @@ func (s *Server) httpHandleGroupIndex(writer http.ResponseWriter, request *http.
groupPath = params["group_path"].([]string)
// The group itself
- err = s.Database.QueryRow(request.Context(), `
+ err = s.database.QueryRow(request.Context(), `
WITH RECURSIVE group_path_cte AS (
SELECT
id,
@@ -69,7 +69,7 @@ func (s *Server) httpHandleGroupIndex(writer http.ResponseWriter, request *http.
// ACL
var count int
- err = s.Database.QueryRow(request.Context(), `
+ err = s.database.QueryRow(request.Context(), `
SELECT COUNT(*)
FROM user_group_roles
WHERE user_id = $1
@@ -96,7 +96,7 @@ func (s *Server) httpHandleGroupIndex(writer http.ResponseWriter, request *http.
}
var newRepoID int
- err := s.Database.QueryRow(
+ err := s.database.QueryRow(
request.Context(),
`INSERT INTO repos (name, description, group_id, contrib_requirements)
VALUES ($1, $2, $3, $4)
@@ -111,9 +111,9 @@ func (s *Server) httpHandleGroupIndex(writer http.ResponseWriter, request *http.
return
}
- filePath := filepath.Join(s.Config.Git.RepoDir, strconv.Itoa(newRepoID)+".git")
+ filePath := filepath.Join(s.config.Git.RepoDir, strconv.Itoa(newRepoID)+".git")
- _, err = s.Database.Exec(
+ _, err = s.database.Exec(
request.Context(),
`UPDATE repos
SET filesystem_path = $1
@@ -137,7 +137,7 @@ func (s *Server) httpHandleGroupIndex(writer http.ResponseWriter, request *http.
// Repos
var rows pgx.Rows
- rows, err = s.Database.Query(request.Context(), `
+ rows, err = s.database.Query(request.Context(), `
SELECT name, COALESCE(description, '')
FROM repos
WHERE group_id = $1
@@ -162,7 +162,7 @@ func (s *Server) httpHandleGroupIndex(writer http.ResponseWriter, request *http.
}
// Subgroups
- rows, err = s.Database.Query(request.Context(), `
+ rows, err = s.database.Query(request.Context(), `
SELECT name, COALESCE(description, '')
FROM groups
WHERE parent_group = $1