fix(server): remove shared link with removed asset (#5845)

This commit is contained in:
martin
2023-12-19 18:05:18 +01:00
committed by GitHub
parent 81af48af7b
commit 7e216809f3
2 changed files with 17 additions and 1 deletions
@@ -52,7 +52,7 @@ export class SharedLinkEntity {
@Column({ type: 'boolean', default: true })
showExif!: boolean;
@ManyToMany(() => AssetEntity, (asset) => asset.sharedLinks)
@ManyToMany(() => AssetEntity, (asset) => asset.sharedLinks, { onDelete: 'CASCADE', onUpdate: 'CASCADE' })
assets!: AssetEntity[];
@Index('IDX_sharedlink_albumId')