Skip to content

Commit bfa1702

Browse files
committed
Improve OpenAPI documentation for DELETE /api/v1/me/tokens/current endpoint
1 parent 156fe4a commit bfa1702

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/controllers/token.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ pub async fn revoke_api_token(
269269
path = "/api/v1/tokens/current",
270270
security(("api_token" = [])),
271271
tag = "api_tokens",
272-
responses((status = 200, description = "Successful Response")),
272+
responses((status = 204, description = "Successful Response")),
273273
)]
274274
pub async fn revoke_current_api_token(app: AppState, req: Parts) -> AppResult<Response> {
275275
let mut conn = app.db_write().await?;

src/snapshots/crates_io__openapi__tests__openapi_snapshot.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4032,7 +4032,7 @@ expression: response.json()
40324032
"description": "This endpoint revokes the API token that is used to authenticate\nthe request.",
40334033
"operationId": "revoke_current_api_token",
40344034
"responses": {
4035-
"200": {
4035+
"204": {
40364036
"description": "Successful Response"
40374037
}
40384038
},

0 commit comments

Comments
 (0)