test for order properly
This commit is contained in:
parent
e1abbb6f33
commit
c28ea0e348
|
@ -71,7 +71,7 @@ func dirList(w http.ResponseWriter, r *http.Request, f http.File) {
|
|||
}
|
||||
order := ""
|
||||
o, ok := r.URL.Query()["key"]
|
||||
if !ok || (order != "asc" && order != "desc") {
|
||||
if !ok || (o[0] != "asc" && o[0] != "desc") {
|
||||
order = "asc"
|
||||
} else {
|
||||
order = o[0]
|
||||
|
|
Loading…
Reference in New Issue