From f66d220a0340a866491a2f8ebab6b2803aba80d3 Mon Sep 17 00:00:00 2001 From: Martin Helmich Date: Thu, 12 Sep 2024 08:31:20 +0200 Subject: [PATCH] Set project ID correctly when creating ingress Fixes #58 --- api/mittwaldv2/client_domain.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/mittwaldv2/client_domain.go b/api/mittwaldv2/client_domain.go index 93b8c6a..015a6c1 100644 --- a/api/mittwaldv2/client_domain.go +++ b/api/mittwaldv2/client_domain.go @@ -30,13 +30,13 @@ func (c *domainClient) GetIngress(ctx context.Context, ingressID string) (*DeMit } func (c *domainClient) CreateIngress(ctx context.Context, projectID string, body IngressCreateIngressJSONRequestBody) (string, error) { + body.ProjectId = uuid.MustParse(projectID) + resp, err := c.client.IngressCreateIngressWithResponse(ctx, body) if err != nil { return "", err } - body.ProjectId = uuid.MustParse(projectID) - if resp.JSON201 == nil { return "", errUnexpectedStatus(resp.StatusCode(), resp.Body) }