fix: correct token summary in swagger to specify the used user. (#10367)

After f93ee5937b.
Ref: https://codeberg.org/forgejo/forgejo/issues/10332#issuecomment-8787096

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/10367
Reviewed-by: Cyborus <cyborus@disroot.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: hollac1 <corneel.vanholland@kadaster.nl>
Co-committed-by: hollac1 <corneel.vanholland@kadaster.nl>
This commit is contained in:
hollac1 2025-12-10 17:13:07 +01:00 committed by Gusted
commit 7794da7e81
2 changed files with 8 additions and 8 deletions

View file

@ -24,7 +24,7 @@ import (
func ListAccessTokens(ctx *context.APIContext) {
// swagger:operation GET /users/{username}/tokens user userGetTokens
// ---
// summary: List the authenticated user's access tokens
// summary: List the specified user's access tokens
// produces:
// - application/json
// parameters:
@ -71,11 +71,11 @@ func ListAccessTokens(ctx *context.APIContext) {
ctx.JSON(http.StatusOK, &apiTokens)
}
// CreateAccessToken creates an access token for doer
// CreateAccessToken creates an access token
func CreateAccessToken(ctx *context.APIContext) {
// swagger:operation POST /users/{username}/tokens user userCreateToken
// ---
// summary: Generate an access token for the current user
// summary: Generate an access token for the specified user
// consumes:
// - application/json
// produces:
@ -141,11 +141,11 @@ func CreateAccessToken(ctx *context.APIContext) {
})
}
// DeleteAccessToken deletes an access token from doer's account
// DeleteAccessToken deletes an access token
func DeleteAccessToken(ctx *context.APIContext) {
// swagger:operation DELETE /users/{username}/tokens/{token} user userDeleteAccessToken
// ---
// summary: Delete an access token from current user's account
// summary: Delete an access token from the specified user's account
// produces:
// - application/json
// parameters:

View file

@ -21706,7 +21706,7 @@
"tags": [
"user"
],
"summary": "List the authenticated user's access tokens",
"summary": "List the specified user's access tokens",
"operationId": "userGetTokens",
"parameters": [
{
@ -21751,7 +21751,7 @@
"tags": [
"user"
],
"summary": "Generate an access token for the current user",
"summary": "Generate an access token for the specified user",
"operationId": "userCreateToken",
"parameters": [
{
@ -21793,7 +21793,7 @@
"tags": [
"user"
],
"summary": "Delete an access token from current user's account",
"summary": "Delete an access token from the specified user's account",
"operationId": "userDeleteAccessToken",
"parameters": [
{