Rename public group URLs to halls

This commit is contained in:
Storm Dragon
2026-05-17 22:22:46 -04:00
parent bda0e548d3
commit 55528b8e62
21 changed files with 312 additions and 312 deletions
+4 -4
View File
@@ -34,7 +34,7 @@ func checkAdmin(w http.ResponseWriter, r *http.Request) bool {
// checkPasswordAdmin checks whether the client authentifies as either an
// administrator or the given user. It is used to check whether the
// client has the right to change user's password.
func checkPasswordAdmin(w http.ResponseWriter, r *http.Request, groupname, user string, wildcard bool) bool {
func checkPasswordAdmin(w http.ResponseWriter, r *http.Request, hallname, user string, wildcard bool) bool {
username, password, ok := r.BasicAuth()
if ok {
ok, err := adminMatch(username, password)
@@ -47,11 +47,11 @@ func checkPasswordAdmin(w http.ResponseWriter, r *http.Request, groupname, user
}
}
if ok && !wildcard && username == user {
desc, err := group.GetDescription(groupname)
desc, err := group.GetDescription(hallname)
if err != nil {
internalError(w,
"Get description for group %v: %v",
groupname, err,
hallname, err,
)
return false
}
@@ -169,7 +169,7 @@ func apiHandler(w http.ResponseWriter, r *http.Request) {
}
w.Header().Set("cache-control", "no-cache")
sendJSON(w, r, stats.GetGroups())
case ".groups":
case ".halls":
apiGroupHandler(w, r, rest)
default:
http.NotFound(w, r)