mirror of
https://github.com/go-gitea/gitea.git
synced 2025-07-20 23:28:28 +02:00
Add PUT endpoint for creating new OAuth2 authentication and clean up routing
This commit is contained in:
parent
25425adf29
commit
62dc4c2da3
@ -26,6 +26,7 @@ import (
|
||||
func CreateOauthAuth(ctx *context.APIContext) {
|
||||
form := web.GetForm(ctx).(*api.CreateAuthOauth2Option)
|
||||
|
||||
// ??? todo: what should I do here?
|
||||
var scopes []string
|
||||
// for _, s := range strings.Split(form.Oauth2Scopes, ",") {
|
||||
// s = strings.TrimSpace(s)
|
||||
|
@ -1650,10 +1650,10 @@ func Routes() *web.Router {
|
||||
|
||||
m.Group("/admin", func() {
|
||||
m.Group("/identity-auth", func() {
|
||||
m.Group("oauth", func() {
|
||||
m.Group("/oauth", func() {
|
||||
m.Get("", admin.SearchOauthAuth)
|
||||
m.Put("/new", bind(api.CreateAuthOauth2Option{}), admin.CreateOauthAuth)
|
||||
m.Delete("/{id}", admin.DeleteOauthAuth)
|
||||
m.Post("/new", admin.CreateOauthAuth)
|
||||
})
|
||||
})
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user