Add deposits rebuild endpoint and fix date serialization

Add POST /api/deposits/rebuild to re-project all bank_to_exchange events.
Fix date-off-by-one by converting java.sql.Date to LocalDate via
ReadableColumn and serializing with Jackson JavaTimeModule.
Sort all event/deposit queries by occurred_at, id.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-08 17:30:43 +01:00
co-authored by Claude Opus 4.6
parent 96d12f170b
commit 8b5c1faeaa
6 changed files with 82 additions and 7 deletions
+3 -1
View File
@@ -174,7 +174,9 @@
{:get (fn [req] (tx/list-events opts req))
:post (fn [req] (tx/create-event! opts req))}]
["/deposits"
{:get (fn [req] (tx/list-deposits opts req))}]])
{:get (fn [req] (tx/list-deposits opts req))}]
["/deposits/rebuild"
{:post (fn [req] (tx/rebuild-deposits! opts req))}]])
(defn route-data [opts]
(merge