Handle adds and deletes
This commit is contained in:
@@ -10,9 +10,9 @@ import (
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
func HandleHeadRequest(directory, torrentName, fileName string, w http.ResponseWriter, req *http.Request, t *torrent.TorrentManager, log *zap.SugaredLogger) {
|
||||
func HandleHeadRequest(directory, torrentName, fileName string, w http.ResponseWriter, req *http.Request, torMgr *torrent.TorrentManager, log *zap.SugaredLogger) {
|
||||
|
||||
torrents, ok := t.DirectoryMap.Get(directory)
|
||||
torrents, ok := torMgr.DirectoryMap.Get(directory)
|
||||
if !ok {
|
||||
log.Warnf("Cannot find directory %s", directory)
|
||||
http.Error(w, "File not found", http.StatusNotFound)
|
||||
|
||||
Reference in New Issue
Block a user