1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Add Get/Update for api/v1/user/applications/oauth2 (#11008)

Add api methods for getting and updating user oauth2 applications.

Signed-off-by: Dan Molik <dan@danmolik.com>

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
Dan Molik
2020-04-09 20:37:31 -04:00
committed by GitHub
parent 4ec7a659ce
commit 743022116d
4 changed files with 214 additions and 4 deletions

View File

@@ -580,7 +580,10 @@ func RegisterRoutes(m *macaron.Macaron) {
m.Combo("/oauth2").
Get(user.ListOauth2Applications).
Post(bind(api.CreateOAuth2ApplicationOptions{}), user.CreateOauth2Application)
m.Delete("/oauth2/:id", user.DeleteOauth2Application)
m.Combo("/oauth2/:id").
Delete(user.DeleteOauth2Application).
Patch(bind(api.CreateOAuth2ApplicationOptions{}), user.UpdateOauth2Application).
Get(user.GetOauth2Application)
}, reqToken())
m.Group("/gpg_keys", func() {