mirror of
https://github.com/ultrasn0w/huso.git
synced 2025-12-13 13:59:53 +01:00
a
This commit is contained in:
4
ober.go
4
ober.go
@@ -186,13 +186,13 @@ func WatchPost(ctx *fasthttp.RequestCtx) {
|
||||
return
|
||||
}
|
||||
username := fmt.Sprintf("%s", ctx.UserValue("user"))
|
||||
if !authenticate(username, string(auth)) {
|
||||
if !GheddoAuth(username, string(auth)) {
|
||||
ctx.SetStatusCode(fasthttp.StatusUnauthorized)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
func authenticate(username, auth string) bool {
|
||||
func GheddoAuth(username, auth string) bool {
|
||||
user, err := ReadUser(username)
|
||||
if err != nil {
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user