Closed lauchste closed 3 years ago
Hiya,
Welcome to the FusionAuth community @lauchste, thanks for opening an issue!
We've had this on the list to change that to a pointer, but haven't had the time to test it and didn't want to ship untested code.
However, we happily accept PRs. These client libraries are built using https://github.com/fusionauth/fusionauth-client-builder but I haven't worked through how to change the type of User
to *User
.
This feels like a duplicate of https://github.com/FusionAuth/go-client/issues/48 . Is that correct? If so, there are some workarounds on that issue too.
Yes, it's a duplicate. For now I'm using the workaround described there.
"Create a User Registration (for an existing user)"
Doesnt seem to work, because of https://stackoverflow.com/questions/33447334/golang-json-marshal-how-to-omit-empty-nested-struct (a User Object is always passed, even if its ommitted, causing your Client to want to create a new User)
Could you maybe change Domain.go line 2691 into a User-Pointer, like so? type RegistrationRequest struct { GenerateAuthenticationToken bool
json:"generateAuthenticationToken"
Registration UserRegistrationjson:"registration,omitempty"
SendSetPasswordEmail booljson:"sendSetPasswordEmail"
SkipRegistrationVerification booljson:"skipRegistrationVerification"
SkipVerification booljson:"skipVerification"
User *Userjson:"user,omitempty"
}Then it works.