diff options
Diffstat (limited to 'api4/api.go')
-rw-r--r-- | api4/api.go | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/api4/api.go b/api4/api.go index 8d03d91d1..fd9b679d2 100644 --- a/api4/api.go +++ b/api4/api.go @@ -64,8 +64,10 @@ type Routes struct { OutgoingHooks *mux.Router // 'api/v4/hooks/outgoing' OutgoingHook *mux.Router // 'api/v4/hooks/outgoing/{hook_id:[A-Za-z0-9]+}' - Admin *mux.Router // 'api/v4/admin' - OAuth *mux.Router // 'api/v4/oauth' + OAuth *mux.Router // 'api/v4/oauth' + OAuthApps *mux.Router // 'api/v4/oauth/apps' + OAuthApp *mux.Router // 'api/v4/oauth/apps/{app_id:[A-Za-z0-9]+}' + SAML *mux.Router // 'api/v4/saml' Compliance *mux.Router // 'api/v4/compliance' Cluster *mux.Router // 'api/v4/cluster' @@ -146,8 +148,11 @@ func InitApi(full bool) { BaseRoutes.OutgoingHook = BaseRoutes.OutgoingHooks.PathPrefix("/{hook_id:[A-Za-z0-9]+}").Subrouter() BaseRoutes.SAML = BaseRoutes.ApiRoot.PathPrefix("/saml").Subrouter() + BaseRoutes.OAuth = BaseRoutes.ApiRoot.PathPrefix("/oauth").Subrouter() - BaseRoutes.Admin = BaseRoutes.ApiRoot.PathPrefix("/admin").Subrouter() + BaseRoutes.OAuthApps = BaseRoutes.OAuth.PathPrefix("/apps").Subrouter() + BaseRoutes.OAuthApp = BaseRoutes.OAuthApps.PathPrefix("/{app_id:[A-Za-z0-9]+}").Subrouter() + BaseRoutes.Compliance = BaseRoutes.ApiRoot.PathPrefix("/compliance").Subrouter() BaseRoutes.Cluster = BaseRoutes.ApiRoot.PathPrefix("/cluster").Subrouter() BaseRoutes.LDAP = BaseRoutes.ApiRoot.PathPrefix("/ldap").Subrouter() @@ -180,6 +185,7 @@ func InitApi(full bool) { InitStatus() InitWebSocket() InitEmoji() + InitOAuth() InitReaction() InitWebrtc() |