summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/api.go
diff options
context:
space:
mode:
authorDan Molik <dan@danmolik.com>2020-04-09 20:37:31 -0400
committerGitHub <noreply@github.com>2020-04-09 19:37:31 -0500
commit743022116df236c0a77c020ad142a6e21b394320 (patch)
tree3cf43fe05f84d3e270ca38e28bba2af66c7eb502 /routers/api/v1/api.go
parent4ec7a659cee94036d4632a7d3a09d37939ea1548 (diff)
downloadgitea-743022116df236c0a77c020ad142a6e21b394320.tar.gz
gitea-743022116df236c0a77c020ad142a6e21b394320.zip
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>
Diffstat (limited to 'routers/api/v1/api.go')
-rw-r--r--routers/api/v1/api.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go
index 150c073c91..bce3bf2452 100644
--- a/routers/api/v1/api.go
+++ b/routers/api/v1/api.go
@@ -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() {