The REST API endpoint POST /api/v1/solodit/findings always returns report_date: {} (empty object) regardless of filters applied. This appears to be a serialization bug — the field is a JavaScript Date object on the server, and JSON.stringify() serializes Date instances as {} instead of an ISO string.
Steps to Reproduce:
curl -X POST https://solodit.cyfrin.io/api/v1/solodit/findings \
-H "Content-Type: application/json" \
-H "X-Cyfrin-API-Key: <YOUR_API_KEY>" \
-d '{
"page": 1,
"pageSize": 2,
"filters": { "languages": [{ "value": "Solidity" }] },
"sortField": "Recency",
"sortDirection": "Desc"
}'
Expected:
{
"report_date": "2026-03-25T00:00:00.000Z"
}
Actual:
After investigating I found out that the internal tRPC endpoint (/api/trpc/findings.get) returns the date correctly via SuperJSON:
report_date: new Date(1774396800000). This confirms the data exists in the database. The issue might be related to the REST API's JSON serialization layer (?!).
I would really appreciate if you could look into this. Thanks!
The REST API endpoint POST /api/v1/solodit/findings always returns report_date: {} (empty object) regardless of filters applied. This appears to be a serialization bug — the field is a JavaScript Date object on the server, and JSON.stringify() serializes Date instances as {} instead of an ISO string.
Steps to Reproduce:
Expected:
Actual:
After investigating I found out that the internal tRPC endpoint (
/api/trpc/findings.get) returns the date correctly via SuperJSON:report_date: new Date(1774396800000). This confirms the data exists in the database. The issue might be related to the REST API's JSON serialization layer (?!).
I would really appreciate if you could look into this. Thanks!