Skip to content

Commit

Permalink
use create user mutation
Browse files Browse the repository at this point in the history
  • Loading branch information
maciaszczykm committed Dec 11, 2024
1 parent 17b0248 commit 4c19eff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/resource/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,13 @@ func (r *UserResource) Create(ctx context.Context, req resource.CreateRequest, r
return
}

response, err := r.client.UpdateUser(ctx, nil, data.Attributes())
response, err := r.client.CreateUser(ctx, data.Attributes())
if err != nil {
resp.Diagnostics.AddError("Client Error", fmt.Sprintf("Unable to create user, got error: %s", err))
return
}

data.From(response.UpdateUser)
data.From(response.CreateUser)
resp.Diagnostics.Append(resp.State.Set(ctx, data)...)
}

Expand Down

0 comments on commit 4c19eff

Please sign in to comment.