test for order properly
This commit is contained in:
@@ -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]
|
||||
|
Reference in New Issue
Block a user