Add method to webhook.

This commit is contained in:
Yang Luo
2021-12-26 19:56:02 +08:00
parent 2ec947d488
commit 5015bf1c7d
4 changed files with 29 additions and 4 deletions

View File

@ -114,6 +114,23 @@ class WebhookEditPage extends React.Component {
}} />
</Col>
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={(Setting.isMobile()) ? 22 : 2}>
{Setting.getLabel(i18next.t("webhook:Method"), i18next.t("webhook:Method - Tooltip"))} :
</Col>
<Col span={22} >
<Select virtual={false} style={{width: '100%'}} value={this.state.webhook.method} onChange={(value => {this.updateWebhookField('method', value);})}>
{
[
{id: 'POST', name: 'POST'},
{id: 'GET', name: 'GET'},
{id: 'PUT', name: 'PUT'},
{id: 'DELETE', name: 'DELETE'},
].map((method, index) => <Option key={index} value={method.id}>{method.name}</Option>)
}
</Select>
</Col>
</Row>
<Row style={{marginTop: '20px'}} >
<Col style={{marginTop: '5px'}} span={(Setting.isMobile()) ? 22 : 2}>
{Setting.getLabel(i18next.t("webhook:Content type"), i18next.t("webhook:Content type - Tooltip"))} :