-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Closed
Labels
modifies/apiThis PR adds API routes or modifies themThis PR adds API routes or modifies themtype/enhancementAn improvement of existing functionalityAn improvement of existing functionality
Milestone
Description
- Gitea version (or commit ref): 1.4.2
- Git version: 2.7.4
- Operating system:
CentOS release 6.9 (Final)
- Database (use
[x]
):- PostgreSQL
- MySQL
- MSSQL
- SQLite
- Can you reproduce the bug at https://try.gitea.io:
- Yes (provide example URL)
- No
- Not relevant
- Log gist:
Description
There are two API routes for the user auth token in the current swagger docs: https://try.gitea.io/api/swagger
GET /users/{username}/tokens
List the authenticated user's access tokens
POST /users/{username}/tokens
Create an access token
but DELETE
a token for a user is missing.
See https://github.com/go-gitea/gitea/blob/908e8942ccae5b7966c7084780b3441e2190d9c1/routers/api/v1/user/app.go
So, what it needs (next to the swagger definitions) is, that the function
func DeleteAccessToken(ctx *context.APIContext)
in
gitea/routers/api/v1/user/app.go
is added, which calls models.DeleteAccessTokenByID(token_id, user_id)
, right?
Or is this route for some reason an unwanted feature?
Metadata
Metadata
Assignees
Labels
modifies/apiThis PR adds API routes or modifies themThis PR adds API routes or modifies themtype/enhancementAn improvement of existing functionalityAn improvement of existing functionality