Skip to content

Commit

Permalink
Kibana SLOs: use spaceID (#485)
Browse files Browse the repository at this point in the history
  • Loading branch information
afharo authored Nov 20, 2023
1 parent 499eead commit e30fda0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/clients/kibana/slo.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func GetSlo(ctx context.Context, apiClient *clients.ApiClient, id, spaceID strin
}

ctxWithAuth := apiClient.SetSloAuthContext(ctx)
req := client.GetSloOp(ctxWithAuth, "default", id).KbnXsrf("true")
req := client.GetSloOp(ctxWithAuth, spaceID, id).KbnXsrf("true")
sloRes, res, err := req.Execute()
if res == nil {
return nil, diag.FromErr(err)
Expand All @@ -33,7 +33,7 @@ func GetSlo(ctx context.Context, apiClient *clients.ApiClient, id, spaceID strin

defer res.Body.Close()

return sloResponseToModel("default", sloRes), utils.CheckHttpError(res, "Unable to get slo with ID "+string(id))
return sloResponseToModel(spaceID, sloRes), utils.CheckHttpError(res, "Unable to get slo with ID "+string(id))
}

func DeleteSlo(ctx context.Context, apiClient *clients.ApiClient, sloId string, spaceId string) diag.Diagnostics {
Expand Down

0 comments on commit e30fda0

Please sign in to comment.