fix: rename total to count in AIBridgeListInterceptionsResponse (#20410)

Thanks to the great work in #20393, we’ve successfully introduced
offset-based pagination for this endpoint. However, the frontend expects
a `count` field in the response rather than `total`. This PR updates the
response payload to rename the returned key to `count` for consistency
with frontend expectations and existing API patterns.

This is necessary to unblock the work in #20331
This commit is contained in:
Jake Howell
2025-10-23 13:19:12 +11:00
committed by GitHub
parent 4bd7c7b7e0
commit d455f6ea2b
8 changed files with 18 additions and 18 deletions
+2 -2
View File
@@ -28,6 +28,7 @@ curl -X GET http://coder-server:8080/api/v2/api/experimental/aibridge/intercepti
```json
{
"count": 0,
"results": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
@@ -89,8 +90,7 @@ curl -X GET http://coder-server:8080/api/v2/api/experimental/aibridge/intercepti
}
]
}
],
"total": 0
]
}
```
+3 -3
View File
@@ -515,6 +515,7 @@
```json
{
"count": 0,
"results": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
@@ -576,8 +577,7 @@
}
]
}
],
"total": 0
]
}
```
@@ -585,8 +585,8 @@
| Name | Type | Required | Restrictions | Description |
|-----------|-------------------------------------------------------------------------|----------|--------------|-------------|
| `count` | integer | false | | |
| `results` | array of [codersdk.AIBridgeInterception](#codersdkaibridgeinterception) | false | | |
| `total` | integer | false | | |
## codersdk.AIBridgeOpenAIConfig