Include path and hashes in destroy hook input (#2102)

This commit is contained in:
WithoutPants
2021-12-13 14:38:00 +11:00
committed by GitHub
parent 9a8f05d826
commit 79e01589ca
6 changed files with 91 additions and 10 deletions

View File

@@ -494,7 +494,12 @@ func (r *mutationResolver) SceneDestroy(ctx context.Context, input models.SceneD
fileDeleter.Commit()
// call post hook after performing the other actions
r.hookExecutor.ExecutePostHooks(ctx, s.ID, plugin.SceneDestroyPost, input, nil)
r.hookExecutor.ExecutePostHooks(ctx, s.ID, plugin.SceneDestroyPost, plugin.SceneDestroyInput{
SceneDestroyInput: input,
Checksum: s.Checksum.String,
OSHash: s.OSHash.String,
Path: s.Path,
}, nil)
return true, nil
}
@@ -545,7 +550,12 @@ func (r *mutationResolver) ScenesDestroy(ctx context.Context, input models.Scene
for _, scene := range scenes {
// call post hook after performing the other actions
r.hookExecutor.ExecutePostHooks(ctx, scene.ID, plugin.SceneDestroyPost, input, nil)
r.hookExecutor.ExecutePostHooks(ctx, scene.ID, plugin.SceneDestroyPost, plugin.ScenesDestroyInput{
ScenesDestroyInput: input,
Checksum: scene.Checksum.String,
OSHash: scene.OSHash.String,
Path: scene.Path,
}, nil)
}
return true, nil