Fix: Cannot delete user after KOReader setup (#1454)
This commit is contained in:
+3
@@ -61,6 +61,9 @@ public class BookLoreUserEntity {
|
|||||||
@OneToMany(mappedBy = "user", cascade = CascadeType.ALL, orphanRemoval = true, fetch = FetchType.EAGER)
|
@OneToMany(mappedBy = "user", cascade = CascadeType.ALL, orphanRemoval = true, fetch = FetchType.EAGER)
|
||||||
private Set<UserSettingEntity> settings = new HashSet<>();
|
private Set<UserSettingEntity> settings = new HashSet<>();
|
||||||
|
|
||||||
|
@OneToOne(mappedBy = "bookLoreUser", cascade = CascadeType.ALL, orphanRemoval = true)
|
||||||
|
private KoreaderUserEntity koreaderUser;
|
||||||
|
|
||||||
@PrePersist
|
@PrePersist
|
||||||
public void prePersist() {
|
public void prePersist() {
|
||||||
this.createdAt = LocalDateTime.now();
|
this.createdAt = LocalDateTime.now();
|
||||||
|
|||||||
+1
-1
@@ -36,7 +36,7 @@ public class KoreaderUserEntity {
|
|||||||
@Column(name = "sync_enabled", nullable = false)
|
@Column(name = "sync_enabled", nullable = false)
|
||||||
private boolean syncEnabled = false;
|
private boolean syncEnabled = false;
|
||||||
|
|
||||||
@ManyToOne(fetch = FetchType.LAZY)
|
@OneToOne(fetch = FetchType.LAZY)
|
||||||
@JoinColumn(name = "booklore_user_id")
|
@JoinColumn(name = "booklore_user_id")
|
||||||
private BookLoreUserEntity bookLoreUser;
|
private BookLoreUserEntity bookLoreUser;
|
||||||
|
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ export class CoverGeneratorComponent {
|
|||||||
${authorElements}
|
${authorElements}
|
||||||
</svg>
|
</svg>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const base64 = btoa(encodeURIComponent(svg).replace(/%([0-9A-F]{2})/g, (match, p1) => {
|
const base64 = btoa(encodeURIComponent(svg).replace(/%([0-9A-F]{2})/g, (match, p1) => {
|
||||||
return String.fromCharCode(parseInt(p1, 16));
|
return String.fromCharCode(parseInt(p1, 16));
|
||||||
}));
|
}));
|
||||||
|
|||||||
Reference in New Issue
Block a user