chore: update find activities

This commit is contained in:
Steven
2024-08-13 23:04:13 +08:00
parent 9876fb27a4
commit f057cd0078
4 changed files with 15 additions and 2 deletions

View File

@ -46,6 +46,9 @@ func (d *DB) ListActivities(ctx context.Context, find *store.FindActivity) ([]*s
if find.PayloadShortcutID != nil {
where, args = append(where, fmt.Sprintf("CAST(payload::JSON->>'shortcutId' AS INTEGER) = %s", placeholder(len(args)+1))), append(args, *find.PayloadShortcutID)
}
if find.CreatedTsAfter != nil {
where, args = append(where, "created_ts > "+placeholder(len(args)+1)), append(args, *find.CreatedTsAfter)
}
query := `
SELECT