mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-30 18:27:45 -05:00
Enhancement: allow specifying JSON encoding for webhooks (#8799)
This commit is contained in:
@@ -338,7 +338,10 @@
|
||||
<input type="hidden" formControlName="id" />
|
||||
<div class="col">
|
||||
<pngx-input-text i18n-title title="Webhook url" formControlName="url" [error]="error?.actions?.[i]?.url"></pngx-input-text>
|
||||
<pngx-input-switch i18n-title title="Use parameters for webhook body" formControlName="use_params"></pngx-input-switch>
|
||||
<div class="d-flex">
|
||||
<pngx-input-switch i18n-title title="Use parameters for webhook body" formControlName="use_params" [horizontal]="true"></pngx-input-switch>
|
||||
<pngx-input-switch i18n-title title="Send webhook payload as JSON" formControlName="as_json" [horizontal]="true" class="ms-5"></pngx-input-switch>
|
||||
</div>
|
||||
@if (formGroup.get('webhook').value['use_params']) {
|
||||
<pngx-input-entries i18n-title title="Webhook params" formControlName="params" [error]="error?.actions?.[i]?.params"></pngx-input-entries>
|
||||
} @else {
|
||||
|
@@ -471,6 +471,7 @@ export class WorkflowEditDialogComponent
|
||||
id: new FormControl(action.webhook?.id),
|
||||
url: new FormControl(action.webhook?.url),
|
||||
use_params: new FormControl(action.webhook?.use_params),
|
||||
as_json: new FormControl(action.webhook?.as_json),
|
||||
params: new FormControl(action.webhook?.params),
|
||||
body: new FormControl(action.webhook?.body),
|
||||
headers: new FormControl(action.webhook?.headers),
|
||||
@@ -588,6 +589,7 @@ export class WorkflowEditDialogComponent
|
||||
id: null,
|
||||
url: null,
|
||||
use_params: true,
|
||||
as_json: false,
|
||||
params: null,
|
||||
body: null,
|
||||
headers: null,
|
||||
|
Reference in New Issue
Block a user