diff options
author | Runxi Yu <me@runxiyu.org> | 2025-03-25 12:49:28 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-03-25 12:49:28 +0800 |
commit | 999bb7d65ecf61f59f8d54a60362307537e49030 (patch) | |
tree | 2f5d76e82d3b178b5dcb08182c8690534e446407 /http_handle_group_index.go | |
parent | Remove unnecessary whitespace in branches template (diff) | |
download | forge-999bb7d65ecf61f59f8d54a60362307537e49030.tar.gz forge-999bb7d65ecf61f59f8d54a60362307537e49030.tar.zst forge-999bb7d65ecf61f59f8d54a60362307537e49030.zip |
Add 403 and 501 pages
Diffstat (limited to 'http_handle_group_index.go')
-rw-r--r-- | http_handle_group_index.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/http_handle_group_index.go b/http_handle_group_index.go index d8e496f..eef6682 100644 --- a/http_handle_group_index.go +++ b/http_handle_group_index.go @@ -79,7 +79,7 @@ func httpHandleGroupIndex(writer http.ResponseWriter, request *http.Request, par if request.Method == http.MethodPost { if !directAccess { - http.Error(writer, "You do not have direct access to this group", http.StatusForbidden) + errorPage403(writer, params, "You do not have direct access to this group") return } @@ -87,7 +87,7 @@ func httpHandleGroupIndex(writer http.ResponseWriter, request *http.Request, par repoDesc := request.FormValue("repo_desc") contribReq := request.FormValue("repo_contrib") if repoName == "" { - http.Error(writer, "Repo name is required", http.StatusBadRequest) + errorPage400(writer, params, "Repo name is required") return } |