Rebrand project as Skald
This commit is contained in:
+7
-7
@@ -13,9 +13,9 @@ import (
|
||||
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
|
||||
"github.com/jech/galene/group"
|
||||
"github.com/jech/galene/stats"
|
||||
"github.com/jech/galene/token"
|
||||
"git.stormux.org/storm/skald/group"
|
||||
"git.stormux.org/storm/skald/stats"
|
||||
"git.stormux.org/storm/skald/token"
|
||||
)
|
||||
|
||||
// checkAdmin checks whether the client authentifies as an administrator
|
||||
@@ -25,7 +25,7 @@ func checkAdmin(w http.ResponseWriter, r *http.Request) bool {
|
||||
ok, _ = adminMatch(username, password)
|
||||
}
|
||||
if !ok {
|
||||
failAuthentication(w, "/galene-api/")
|
||||
failAuthentication(w, "/skald-api/")
|
||||
return false
|
||||
}
|
||||
return true
|
||||
@@ -71,7 +71,7 @@ func checkPasswordAdmin(w http.ResponseWriter, r *http.Request, groupname, user
|
||||
}
|
||||
}
|
||||
}
|
||||
failAuthentication(w, "/galene-api/")
|
||||
failAuthentication(w, "/skald-api/")
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -141,12 +141,12 @@ func apiCORS(w http.ResponseWriter, r *http.Request, methods string) bool {
|
||||
}
|
||||
|
||||
func apiHandler(w http.ResponseWriter, r *http.Request) {
|
||||
if !strings.HasPrefix(r.URL.Path, "/galene-api/") {
|
||||
if !strings.HasPrefix(r.URL.Path, "/skald-api/") {
|
||||
http.NotFound(w, r)
|
||||
return
|
||||
}
|
||||
|
||||
first, kind, rest := splitPath(r.URL.Path[len("/galene-api"):])
|
||||
first, kind, rest := splitPath(r.URL.Path[len("/skald-api"):])
|
||||
if first != "/v0" {
|
||||
http.NotFound(w, r)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user