delete functionality

This commit is contained in:
Ben Sarmiento
2023-11-21 13:10:48 +01:00
parent 3901230943
commit 849dbb97dd
8 changed files with 135 additions and 32 deletions

View File

@@ -38,9 +38,13 @@ func Router(mux *http.ServeMux, c config.ConfigInterface, t *torrent.TorrentMana
})
mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
davlog := logutil.NewLogger().Named("dav")
switch r.Method {
case "PROPFIND":
dav.HandlePropfindRequest(w, r, t)
dav.HandlePropfindRequest(w, r, t, davlog)
case "DELETE":
dav.HandleDeleteRequest(w, r, t, davlog)
case http.MethodGet:
universal.HandleGetRequest(w, r, t, c, cache)