mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
generate screenshot using Xlib.
This commit is contained in:
@ -66,3 +66,14 @@ func CanHostOnly(next http.Handler) http.Handler {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func CanWatchOnly(next http.Handler) http.Handler {
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
session := GetSession(r)
|
||||
if !session.CanWatch() {
|
||||
utils.HttpForbidden(w, "Only for members, that can watch.")
|
||||
} else {
|
||||
next.ServeHTTP(w, r)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user