add endpoint to invalidate notification token
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user