Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0
Cette révision appartient à :
sfan5 2017-05-08 20:10:55 +02:00
Parent 64fc5b3940
révision 7692df4b29

Voir le fichier

@ -55,10 +55,10 @@ func GetTorrentById(id string) (model.Torrents, error) {
func GetTorrentsOrderBy(parameters *WhereParams, orderBy string, limit int, offset int) ([]model.Torrents, int) {
var torrents []model.Torrents
var count int
conditions := ""
conditions := "1" // FIXME
if strings.HasPrefix(orderBy, "filesize") {
// torrents w/ NULL filesize fuck up the sorting on postgres
conditions = "filesize IS NOT NULL"
conditions += " AND filesize IS NOT NULL"
}
var params []interface{}