Commit Graph

2 Commits

Author SHA1 Message Date
zenfun
dd32ee817d test(api): align tests with new envelope codes
Update API handler tests to expect numeric `code`, `success` messages, and
new envelope fields (`trace_id`, `details`), matching recent response
envelope changes.
2026-01-10 00:39:35 +08:00
zenfun
33838b1e2c feat(api): wrap JSON responses in envelope
Add response envelope middleware to standardize JSON responses as
`{code,data,message}` with consistent business codes across endpoints.
Update Swagger annotations and tests to reflect the new response shape.

BREAKING CHANGE: API responses are now wrapped in a response envelope; clients must read payloads from `data` and handle `code`/`message` fields.
2026-01-10 00:15:08 +08:00