mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 12:24:38 +03:00
Add a TagMergePost post-hook (#2010)
* Add a TagMergePost post-hook Introduce a post-hook for merging tags, call it in the merge path, as the last thing we do before returning.
This commit is contained in:
@@ -347,5 +347,6 @@ func (r *mutationResolver) TagsMerge(ctx context.Context, input models.TagsMerge
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
r.hookExecutor.ExecutePostHooks(ctx, t.ID, plugin.TagMergePost, input, nil)
|
||||||
return t, nil
|
return t, nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ const (
|
|||||||
|
|
||||||
TagCreatePost HookTriggerEnum = "Tag.Create.Post"
|
TagCreatePost HookTriggerEnum = "Tag.Create.Post"
|
||||||
TagUpdatePost HookTriggerEnum = "Tag.Update.Post"
|
TagUpdatePost HookTriggerEnum = "Tag.Update.Post"
|
||||||
|
TagMergePost HookTriggerEnum = "Tag.Merge.Post"
|
||||||
TagDestroyPost HookTriggerEnum = "Tag.Destroy.Post"
|
TagDestroyPost HookTriggerEnum = "Tag.Destroy.Post"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -74,6 +75,7 @@ var AllHookTriggerEnum = []HookTriggerEnum{
|
|||||||
|
|
||||||
TagCreatePost,
|
TagCreatePost,
|
||||||
TagUpdatePost,
|
TagUpdatePost,
|
||||||
|
TagMergePost,
|
||||||
TagDestroyPost,
|
TagDestroyPost,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +1,5 @@
|
|||||||
|
### 🎨 Improvements
|
||||||
|
* Added plugin hook for Tag merge operation. ([#2010](https://github.com/stashapp/stash/pull/2010))
|
||||||
|
|
||||||
### 🐛 Bug fixes
|
### 🐛 Bug fixes
|
||||||
* Fix "Custom Performer Images" feature picking up non-image files. ([#2017](https://github.com/stashapp/stash/pull/2017))
|
* Fix "Custom Performer Images" feature picking up non-image files. ([#2017](https://github.com/stashapp/stash/pull/2017))
|
||||||
|
|||||||
@@ -125,6 +125,7 @@ The following operations are supported:
|
|||||||
* `Create`
|
* `Create`
|
||||||
* `Update`
|
* `Update`
|
||||||
* `Destroy`
|
* `Destroy`
|
||||||
|
* `Merge` (for `Tag` only)
|
||||||
|
|
||||||
Currently, only `Post` hook types are supported. These are executed after the operation has completed and the transaction is committed.
|
Currently, only `Post` hook types are supported. These are executed after the operation has completed and the transaction is committed.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user