fix(journal): captures panel filter uses date_from and date_to
/api/journal/moments takes date_from + date_to query params, not the single 'date' name the frontend was sending. Filter was silently ignored; the panel showed every moment in the database ordered by recency, making it look like a weird recap of past events instead of today's captures. No backend change; just send the right param names. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -76,7 +76,15 @@ async function loadMoments() {
|
||||
}
|
||||
momentsLoading.value = true
|
||||
try {
|
||||
moments.value = await listJournalMoments({ date: selectedDay.value, limit: 100 })
|
||||
// /api/journal/moments takes date_from + date_to (NOT `date`).
|
||||
// Passing a single ISO date for both bounds gives us the moments
|
||||
// recorded on that calendar day, which is what the captures panel
|
||||
// means by "today".
|
||||
moments.value = await listJournalMoments({
|
||||
date_from: selectedDay.value,
|
||||
date_to: selectedDay.value,
|
||||
limit: 100,
|
||||
})
|
||||
} catch {
|
||||
/* silent — moments may not exist yet */
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user