Refactor routing
This commit is contained in:
@@ -23,8 +23,8 @@ func NewGetFile(client *zurghttp.HTTPClient) *GetFile {
|
||||
return &GetFile{client: client}
|
||||
}
|
||||
|
||||
// HandleGetRequest handles a GET request universally for both WebDAV and HTTP
|
||||
func (gf *GetFile) HandleGetRequest(directory, torrentName, fileName string, resp http.ResponseWriter, req *http.Request, torMgr *intTor.TorrentManager, cfg config.ConfigInterface, log *logutil.Logger) {
|
||||
// ServeFile handles a GET request universally for both WebDAV and HTTP
|
||||
func (gf *GetFile) ServeFile(directory, torrentName, fileName string, resp http.ResponseWriter, req *http.Request, torMgr *intTor.TorrentManager, cfg config.ConfigInterface, log *logutil.Logger) {
|
||||
torrents, ok := torMgr.DirectoryMap.Get(directory)
|
||||
if !ok {
|
||||
log.Warnf("Cannot find directory %s", directory)
|
||||
|
||||
Reference in New Issue
Block a user