mirror of
https://github.com/immich-app/immich
synced 2026-08-15 13:03:57 +00:00
chore: make webhooks workflow-agnostic (#29404)
This commit is contained in:
parent
165bca4b0a
commit
6a7a34d294
1 changed files with 6 additions and 2 deletions
|
|
@ -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,
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue