mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-28 18:24:38 -05:00
Allow webhook body
This commit is contained in:
@@ -336,7 +336,12 @@
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<pngx-input-text i18n-title title="Webhook url" formControlName="webhook_url" [error]="error?.actions?.[i]?.webhook_url"></pngx-input-text>
|
||||
<pngx-input-entries i18n-title title="Webhook params" formControlName="webhook_params" [error]="error?.actions?.[i]?.webhook_params"></pngx-input-entries>
|
||||
<pngx-input-switch i18n-title title="Use parameters for webhook body" formControlName="webhook_use_params"></pngx-input-switch>
|
||||
@if (formGroup.get('webhook_use_params').value) {
|
||||
<pngx-input-entries i18n-title title="Webhook params" formControlName="webhook_params" [error]="error?.actions?.[i]?.webhook_params"></pngx-input-entries>
|
||||
} @else {
|
||||
<pngx-input-textarea i18n-title title="Webhook body" formControlName="webhook_body" [error]="error?.actions?.[i]?.webhook_body"></pngx-input-textarea>
|
||||
}
|
||||
<pngx-input-entries i18n-title title="Webhook headers" formControlName="webhook_headers" [error]="error?.actions?.[i]?.webhook_headers"></pngx-input-entries>
|
||||
<pngx-input-switch i18n-title title="Include document" formControlName="webhook_include_document"></pngx-input-switch>
|
||||
</div>
|
||||
|
@@ -415,7 +415,9 @@ export class WorkflowEditDialogComponent
|
||||
email_to: new FormControl(action.email_to),
|
||||
email_include_document: new FormControl(action.email_include_document),
|
||||
webhook_url: new FormControl(action.webhook_url),
|
||||
webhook_use_params: new FormControl(action.webhook_use_params),
|
||||
webhook_params: new FormControl(action.webhook_params),
|
||||
webhook_body: new FormControl(action.webhook_body),
|
||||
webhook_headers: new FormControl(action.webhook_headers),
|
||||
webhook_include_document: new FormControl(
|
||||
action.webhook_include_document
|
||||
@@ -526,7 +528,9 @@ export class WorkflowEditDialogComponent
|
||||
email_to: null,
|
||||
email_include_document: false,
|
||||
webhook_url: null,
|
||||
webhook_use_params: true,
|
||||
webhook_params: null,
|
||||
webhook_body: null,
|
||||
webhook_headers: null,
|
||||
webhook_include_document: false,
|
||||
}
|
||||
|
@@ -75,8 +75,12 @@ export interface WorkflowAction extends ObjectWithId {
|
||||
|
||||
webhook_url?: string
|
||||
|
||||
webhook_use_params?: boolean
|
||||
|
||||
webhook_params?: object
|
||||
|
||||
webhook_body?: string
|
||||
|
||||
webhook_headers?: object
|
||||
|
||||
webhook_include_document?: boolean
|
||||
|
Reference in New Issue
Block a user