mirror of
https://github.com/aykhans/slash-e.git
synced 2026-11-09 15:31:08 +00:00
chore: update find activities
This commit is contained in:
1 parent
9876fb27a4
commit
f057cd0078
4 files changed
+15
-2
No files matched your search
@@ -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
|
||||
|
||||
@@ -45,6 +45,9 @@ func (d *DB) ListActivities(ctx context.Context, find *store.FindActivity) ([]*s
|
||||
if find.PayloadShortcutID != nil {
|
||||
where, args = append(where, "json_extract(payload, '$.shortcutId') = ?"), append(args, *find.PayloadShortcutID)
|
||||
}
|
||||
if find.CreatedTsAfter != nil {
|
||||
where, args = append(where, "created_ts > ?"), append(args, *find.CreatedTsAfter)
|
||||
}
|
||||
|
||||
query := `
|
||||
SELECT
|
||||
|
||||
Reference in new issue
Block a user