mirror of
https://github.com/filebrowser/filebrowser.git
synced 2024-06-07 23:00:43 +00:00
see #16
This commit is contained in:
parent
eb7920f1c0
commit
d9c62e2428
@ -239,6 +239,10 @@ func (i *Info) serveListing(w http.ResponseWriter, r *http.Request, c *config.Co
|
|||||||
page.Minimal = true
|
page.Minimal = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if strings.Contains(r.Header.Get("Accept"), "application/json") {
|
||||||
|
return page.PrintAsJSON(w)
|
||||||
|
}
|
||||||
|
|
||||||
return page.PrintAsHTML(w, "listing")
|
return page.PrintAsHTML(w, "listing")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ type Listing struct {
|
|||||||
Order string
|
Order string
|
||||||
// If ≠0 then Items have been limited to that many elements
|
// If ≠0 then Items have been limited to that many elements
|
||||||
ItemsLimitedTo int
|
ItemsLimitedTo int
|
||||||
httpserver.Context
|
httpserver.Context `json:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// handleSortOrder gets and stores for a Listing the 'sort' and 'order',
|
// handleSortOrder gets and stores for a Listing the 'sort' and 'order',
|
||||||
|
Loading…
Reference in New Issue
Block a user