Working #1
This commit is contained in:
@@ -67,10 +67,6 @@ func (f FileManager) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, err
|
||||
user = c.User
|
||||
}
|
||||
|
||||
if r.URL.Query().Get("command") != "" {
|
||||
return handlers.Command(w, r, c, user)
|
||||
}
|
||||
|
||||
// Checks if the request URL is for the WebDav server
|
||||
if strings.HasPrefix(r.URL.Path, c.WebDavURL) {
|
||||
// Checks for user permissions relatively to this PATH
|
||||
@@ -112,6 +108,14 @@ func (f FileManager) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, err
|
||||
return http.StatusForbidden, nil
|
||||
}
|
||||
|
||||
if r.URL.Query().Get("search") != "" {
|
||||
return handlers.Search(w, r, c, user)
|
||||
}
|
||||
|
||||
if r.URL.Query().Get("command") != "" {
|
||||
return handlers.Command(w, r, c, user)
|
||||
}
|
||||
|
||||
if r.Method == http.MethodGet {
|
||||
// Gets the information of the directory/file
|
||||
fi, code, err = file.GetInfo(r.URL, c, user)
|
||||
|
||||
Reference in New Issue
Block a user