1
0
Fork 0
forked from forgejo/forgejo

Add ability to delete a token (#4235)

Fix #4234
This commit is contained in:
techknowlogick 2018-07-06 21:54:30 -04:00 committed by GitHub
parent 1675fc4301
commit ab55ca7ebd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 138 additions and 1 deletions

View file

@ -302,6 +302,7 @@ func RegisterRoutes(m *macaron.Macaron) {
m.Group("/tokens", func() {
m.Combo("").Get(user.ListAccessTokens).
Post(bind(api.CreateAccessTokenOption{}), user.CreateAccessToken)
m.Combo("/:id").Delete(user.DeleteAccessToken)
}, reqBasicAuth())
})
})