Setting Consents userid null upon deletion

This commit is contained in:
Alex
2025-05-14 18:25:53 +02:00
parent 242d37713d
commit 20a693a80c
3 changed files with 7 additions and 4 deletions

View File

@@ -239,6 +239,8 @@ func (uc *UserController) RegisterUser(c *gin.Context) {
var regData RegistrationData
if err := c.ShouldBindJSON(&regData); err != nil {
logger.Error.Printf("Failed initial Binding: %#v", &regData.User.Membership)
logger.Error.Printf("Failed initial Binding: %#v", &regData.User.Membership.Subscription)
utils.HandleValidationError(c, err)
return
}
@@ -293,14 +295,14 @@ func (uc *UserController) RegisterUser(c *gin.Context) {
LastName: regData.User.LastName,
Email: regData.User.Email,
ConsentType: "TermsOfService",
UserID: regData.User.ID,
UserID: &regData.User.ID,
},
{
FirstName: regData.User.FirstName,
LastName: regData.User.LastName,
Email: regData.User.Email,
ConsentType: "Privacy",
UserID: regData.User.ID,
UserID: &regData.User.ID,
},
}