close #71; fix bugs
This commit is contained in:
@@ -21,13 +21,13 @@ type response struct {
|
||||
func ServeHTTP(w http.ResponseWriter, r *http.Request, c *config.Config) (int, error) {
|
||||
conf = c
|
||||
// Removes the page main path from the URL
|
||||
r.URL.Path = strings.Replace(r.URL.Path, "/admin/browse", "", 1)
|
||||
r.URL.Path = strings.Replace(r.URL.Path, c.Admin+"/browse", "", 1)
|
||||
|
||||
switch r.Method {
|
||||
case "DELETE":
|
||||
return DELETE(w, r)
|
||||
case "POST":
|
||||
return POST(w, r)
|
||||
return POST(w, r, c)
|
||||
case "GET":
|
||||
return GET(w, r)
|
||||
case "PUT":
|
||||
|
||||
Reference in New Issue
Block a user