fix: PascalCase JSON fields + code:200 success + Unix timestamp ExpDate

This commit is contained in:
2026-07-28 17:09:39 +08:00
parent 7190d93edf
commit 9c3eba2327
4 changed files with 14 additions and 13 deletions
+3 -4
View File
@@ -13,9 +13,8 @@ func listOptions() map[string]string {
}
// listResponse is the JSON envelope returned by Rainyun list endpoints.
// The API wraps data in {"code":0,"data":{"records":[...],"totalRecords":N}}.
// Our client extracts apiResp.Data ({"records":[...]}), then we unmarshal into this.
// API uses PascalCase: {"code":200,"data":{"Records":[...],"TotalRecords":N}}
type listResponse struct {
Records []any `json:"records"`
TotalRecords int `json:"totalRecords"`
Records []any `json:"Records"`
TotalRecords int `json:"TotalRecords"`
}