Skip to content

Commit 8035333

Browse files
committed
Rename secret ID param
This is to make sure it is not mistaken as the actual secret.
1 parent 70ffd00 commit 8035333

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

coderd/apidoc/docs.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/apidoc/swagger.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/httpmw/oauth2.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ func ExtractOAuth2ProviderAppSecret(db database.Store) func(http.Handler) http.H
241241
return func(next http.Handler) http.Handler {
242242
return http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
243243
ctx := r.Context()
244-
secretID, ok := ParseUUIDParam(rw, r, "secret")
244+
secretID, ok := ParseUUIDParam(rw, r, "secretID")
245245
if !ok {
246246
return
247247
}

docs/api/enterprise.md

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

enterprise/coderd/coderd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ func New(ctx context.Context, options *Options) (_ *API, err error) {
321321
r.Get("/", api.oAuth2ProviderAppSecrets)
322322
r.Post("/", api.postOAuth2ProviderAppSecret)
323323

324-
r.Route("/{secret}", func(r chi.Router) {
324+
r.Route("/{secretID}", func(r chi.Router) {
325325
r.Use(httpmw.ExtractOAuth2ProviderAppSecret(options.Database))
326326
r.Delete("/", api.deleteOAuth2ProviderAppSecret)
327327
})

enterprise/coderd/oauth2.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,9 @@ func (api *API) postOAuth2ProviderAppSecret(rw http.ResponseWriter, r *http.Requ
224224
// @Security CoderSessionToken
225225
// @Tags Enterprise
226226
// @Param app path string true "App ID"
227-
// @Param secret path string true "Secret ID"
227+
// @Param secretID path string true "Secret ID"
228228
// @Success 204
229-
// @Router /oauth2-provider/apps/{app}/secrets/{secret} [delete]
229+
// @Router /oauth2-provider/apps/{app}/secrets/{secretID} [delete]
230230
func (api *API) deleteOAuth2ProviderAppSecret(rw http.ResponseWriter, r *http.Request) {
231231
ctx := r.Context()
232232
secret := httpmw.OAuth2ProviderAppSecret(r)

0 commit comments

Comments
 (0)