Skip to content

Commit

Permalink
typo fix
Browse files Browse the repository at this point in the history
  • Loading branch information
catttam committed Jan 26, 2024
1 parent 4e5e5ed commit c7b98a7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pkg/handlers/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func MakeCreateHandler(cfg *types.Config, back types.ServerlessBackend) gin.Hand
var service types.Service

uidOrigin, uidExists := c.Get("uidOrigin")
mcUntyped, mcExists := c.Get("mc")
mcUntyped, mcExists := c.Get("multitenancyConfig")

if !mcExists {
c.String(http.StatusInternalServerError, fmt.Sprintln("Missing multitenancy config"))
Expand Down
6 changes: 3 additions & 3 deletions pkg/handlers/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ func MakeUpdateHandler(cfg *types.Config, back types.ServerlessBackend) gin.Hand
return
}

mcUntyped, mcExists := c.Get("mc")
mcUntyped, mcExists := c.Get("multitenancyConfig")

if !mcExists {
c.String(http.StatusInternalServerError, fmt.Sprintf("Missing multitenancy config"))
c.String(http.StatusInternalServerError, fmt.Sprintln("Missing multitenancy config"))
}

mc, mcParsed := mcUntyped.(*auth.MultitenancyConfig)
mc, mcParsed := mcUntyped.(auth.MultitenancyConfig)

if !mcParsed {
c.String(http.StatusInternalServerError, fmt.Sprintf("Error parsing multitenancy config: %v", mcParsed))
Expand Down
2 changes: 1 addition & 1 deletion pkg/utils/auth/oidc.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func getOIDCMiddleware(kubeClientset *kubernetes.Clientset, minIOAdminClient *ut
}
oidcLogger.Printf("User %s already exists", uid)
c.Set("uidOrigin", uid)
c.Set("multitenancyConfig", &mc)
c.Set("multitenancyConfig", mc)
c.Next()
}
}
Expand Down

0 comments on commit c7b98a7

Please sign in to comment.