feat: tokens (#4380)

This commit is contained in:
Garrett Delfosse
2022-10-06 19:02:27 +00:00
committed by GitHub
parent fe7c9f8ec1
commit f5df54831a
21 changed files with 685 additions and 260 deletions
+8 -2
View File
@@ -399,8 +399,14 @@ func New(options *Options) *API {
r.Get("/roles", api.userRoles)
r.Route("/keys", func(r chi.Router) {
r.Post("/", api.postAPIKey)
r.Get("/{keyid}", api.apiKey)
r.Route("/tokens", func(r chi.Router) {
r.Post("/", api.postToken)
r.Get("/", api.tokens)
})
r.Route("/{keyid}", func(r chi.Router) {
r.Get("/", api.apiKey)
r.Delete("/", api.deleteAPIKey)
})
})
r.Route("/organizations", func(r chi.Router) {