Skip to content

High performance self-hosted photo and video management solution.

chore: make webhooks workflow-agnostic (#29404)

Ben Beckford6a7a34d294f9
diff --git a/packages/plugin-core/src/index.ts b/packages/plugin-core/src/index.ts
index 90083ab689..ff40414339 100644
--- a/packages/plugin-core/src/index.ts
+++ b/packages/plugin-core/src/index.ts
@@ -150,7 +150,7 @@ const methods = wrapper<Manifest>({
changes: { asset: { visibility: config.visibility as AssetVisibility } },
}),
- webhook: ({ config, data, functions }) => {
+ webhook: ({ config, data, functions, type, trigger }) => {
const headers: Record<string, string> = {
'Content-Type': 'application/json',
};
@@ -161,7 +161,11 @@ const methods = wrapper<Manifest>({
functions.httpRequest(config.url, {
method: config.method ?? 'POST',
- body: JSON.stringify(data.asset),
+ body: JSON.stringify({
+ type,
+ trigger,
+ data,
+ }),
headers,
});