Add after handling
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Peter Stuifzand 2021-05-12 22:05:44 +02:00
parent 34daae0d9e
commit f7fe30f387
Signed by: peter
GPG Key ID: 374322D56E5209E8

View File

@ -90,6 +90,12 @@ WHERE "channel_id" = $1
args = append(args, b) args = append(args, b)
qb.WriteString(` AND "published_at" < $2`) qb.WriteString(` AND "published_at" < $2`)
} }
} else if after != "" {
b, err := time.Parse(time.RFC3339, after)
if err == nil {
args = append(args, b)
qb.WriteString(` AND "published_at" > $2`)
}
} }
qb.WriteString(` ORDER BY "published_at"`) qb.WriteString(` ORDER BY "published_at"`)