mirror of
https://github.com/vbatts/imgsrv.git
synced 2024-11-27 10:35:41 +00:00
the All listing is broken
This commit is contained in:
parent
ce7e87f290
commit
ea4f3c65e9
1 changed files with 2 additions and 2 deletions
|
@ -110,9 +110,9 @@ pass -1 for all files
|
|||
func (u Util) GetFiles(limit int) (files []types.File, err error) {
|
||||
//files = []types.File{}
|
||||
if limit == -1 {
|
||||
err = u.Gfs.Find(nil).Sort("-metadata.timestamp").Limit(limit).All(&files)
|
||||
} else {
|
||||
err = u.Gfs.Find(nil).Sort("-metadata.timestamp").All(&files)
|
||||
} else {
|
||||
err = u.Gfs.Find(nil).Sort("-metadata.timestamp").Limit(limit).All(&files)
|
||||
}
|
||||
return files, err
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue