fix(link-modules): recreate dismissed link (#6764)
* fix(link-modules): recreate dismissed link * rm type --------- Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
This commit is contained in:
co-authored by
Oli Juhl
parent
eefde48eef
commit
60070fb65f
@@ -37,6 +37,7 @@ export function getLinkRepository(model: EntitySchema) {
|
||||
link.id,
|
||||
this.joinerConfig_.databaseConfig?.idPrefix ?? "link"
|
||||
)
|
||||
link.deleted_at = null
|
||||
|
||||
return manager.create(model, link)
|
||||
})
|
||||
|
||||
@@ -84,6 +84,13 @@ export function generateEntity(
|
||||
filters: {
|
||||
[SoftDeletableFilterKey]: mikroOrmSoftDeletableFilterOptions,
|
||||
},
|
||||
hooks: {
|
||||
beforeUpdate: [
|
||||
(args) => {
|
||||
args.entity.updated_at = new Date()
|
||||
},
|
||||
],
|
||||
},
|
||||
indexes: [
|
||||
{
|
||||
properties: ["id"],
|
||||
|
||||
Reference in New Issue
Block a user