Skip to content
This repository has been archived by the owner on Mar 4, 2024. It is now read-only.

Commit

Permalink
EVEREST-256 validate on update
Browse files Browse the repository at this point in the history
  • Loading branch information
gen1us2k committed Sep 19, 2023
1 parent 269d056 commit e31d6fa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/database_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ func (e *EverestServer) UpdateDatabaseCluster(ctx echo.Context, kubernetesID str
})
}

if err := e.validateDatabaseClusterCR(ctx, kubernetesID, dbc); err != nil {
return ctx.JSON(http.StatusBadRequest, Error{Message: pointer.ToString(err.Error())})
}

_, kubeClient, code, err := e.initKubeClient(ctx.Request().Context(), kubernetesID)
if err != nil {
return ctx.JSON(code, Error{Message: pointer.ToString(err.Error())})
Expand Down

0 comments on commit e31d6fa

Please sign in to comment.