mirror of
https://github.com/sot-tech/mochi.git
synced 2026-07-16 05:18:09 -07:00
stats test, add/remove torrent handlers, init batter driver
This commit is contained in:
+8
-1
@@ -96,9 +96,16 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
defer s.waitgroup.Done()
|
||||
defer atomic.AddInt64(&s.deltaRequests, 1)
|
||||
|
||||
if r.URL.Path == "/stats" {
|
||||
switch r.URL.Path {
|
||||
case "/stats":
|
||||
s.serveStats(w, r)
|
||||
return
|
||||
case "/add":
|
||||
s.serveAdd(w, r)
|
||||
return
|
||||
case "/remove":
|
||||
s.serveRemove(w, r)
|
||||
return
|
||||
}
|
||||
|
||||
_, action := path.Split(r.URL.Path)
|
||||
|
||||
Reference in New Issue
Block a user