diff options
author | Mike Crute <mike@crute.us> | 2021-11-24 21:58:09 -0800 |
---|---|---|
committer | Mike Crute <mike@crute.us> | 2021-11-24 22:11:12 -0800 |
commit | e5629fb163c7cf303438afc5be6075299cfc6071 (patch) | |
tree | 0f835aa20df3e93d93358810566ab9986db35eaa /cmd | |
parent | 09fa11a1dad5301e8e0aeb069fc1d11312b4a1c5 (diff) | |
download | cloud-identity-broker-e5629fb163c7cf303438afc5be6075299cfc6071.tar.bz2 cloud-identity-broker-e5629fb163c7cf303438afc5be6075299cfc6071.tar.xz cloud-identity-broker-e5629fb163c7cf303438afc5be6075299cfc6071.zip |
Extract URL building logic
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/web/server.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd/web/server.go b/cmd/web/server.go index 9f750bc..610cc72 100644 --- a/cmd/web/server.go +++ b/cmd/web/server.go | |||
@@ -143,23 +143,23 @@ func webMain(cfg app.Config, embeddedTemplates fs.FS, version string) { | |||
143 | { | 143 | { |
144 | account.GET("", controllers.NewAPIAccountListHandler(as)) | 144 | account.GET("", controllers.NewAPIAccountListHandler(as)) |
145 | account.GET( | 145 | account.GET( |
146 | "/:account/credentials", | 146 | "/:provider/:account/credentials", |
147 | controllers.NewAPIRegionListHandler(aws), | 147 | controllers.NewAPIRegionListHandler(aws), |
148 | ) | 148 | ) |
149 | account.GET( | 149 | account.GET( |
150 | "/:account/console", | 150 | "/:provider/:account/console", |
151 | controllers.NewAPIConsoleRedirectHandler(aws, cfg.IssuerEndpoint), | 151 | controllers.NewAPIConsoleRedirectHandler(aws, cfg.IssuerEndpoint), |
152 | rateLimit, | 152 | rateLimit, |
153 | ) | 153 | ) |
154 | account.GET( | 154 | account.GET( |
155 | "/:account/credentials/:region", | 155 | "/:provider/:account/credentials/:region", |
156 | controllers.NewAPICredentialsHandler(aws), | 156 | controllers.NewAPICredentialsHandler(aws), |
157 | rateLimit, | 157 | rateLimit, |
158 | ) | 158 | ) |
159 | (&controllers.APIAccountHandler{ | 159 | (&controllers.APIAccountHandler{ |
160 | Store: as, | 160 | Store: as, |
161 | AdminStore: adminAccountStore, | 161 | AdminStore: adminAccountStore, |
162 | }).Register("/:account", "", account) | 162 | }).Register("/:provider/:account", "", account) |
163 | } | 163 | } |
164 | 164 | ||
165 | user := api.Group("/user") | 165 | user := api.Group("/user") |