add endpoint to invalidate notification token

This commit is contained in:
2026-02-10 14:09:26 +01:00
parent 1b549cc5fc
commit 20d948bcdf
5 changed files with 39 additions and 6 deletions
@@ -59,7 +59,7 @@ public class User {
@Column(name = "role")
private Set<RoleName> roles = new HashSet<>();
@OneToOne
@OneToOne(cascade = CascadeType.REMOVE, orphanRemoval = true)
@JoinColumn(name = "id", referencedColumnName = "user_id")
private NotificationToken notificationToken;
@@ -76,7 +76,8 @@ public class User {
@OneToOne(mappedBy = "user", cascade = CascadeType.ALL, orphanRemoval = true)
private ProfileImageEntity profileImage;
public User() {}
public User() {
}
// public User(Long id, String publicName, String privateName, String email, String password, VisibilityPrivacy visibilityPrivacy, String friendCode, Set<Trip> trips, Set<Friendship> friendships, Set<RoleName> roles) {
// this.id = id;
@@ -103,7 +104,8 @@ public class User {
this.statsList = new StatsList(this);
this.profileImage = new ProfileImageEntity();
this.profileImage.setUser(this); }
this.profileImage.setUser(this);
}
@PrePersist
private void ensureFriendCode() {