Rename /galene-api/0/ to /v0/.

This commit is contained in:
Juliusz Chroboczek
2024-05-03 18:33:37 +02:00
parent 0090ae71dd
commit aa35408dba
5 changed files with 77 additions and 77 deletions
+2 -2
View File
@@ -71,7 +71,7 @@ func apiHandler(w http.ResponseWriter, r *http.Request) {
}
first, kind, rest := splitPath(r.URL.Path[len("/galene-api"):])
if first == "/0" && kind == ".stats" && rest == "" {
if first == "/v0" && kind == ".stats" && rest == "" {
if !checkAdmin(w, r) {
return
}
@@ -89,7 +89,7 @@ func apiHandler(w http.ResponseWriter, r *http.Request) {
e := json.NewEncoder(w)
e.Encode(ss)
return
} else if first == "/0" && kind == ".groups" {
} else if first == "/v0" && kind == ".groups" {
apiGroupHandler(w, r, rest)
return
}