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

@ -20,10 +20,8 @@ import * as Setting from "./Setting";
import * as WebhookBackend from "./backend/WebhookBackend";
import i18next from "i18next";
import BaseListPage from "./BaseListPage";
import * as ProviderBackend from "./backend/ProviderBackend";
class WebhookListPage extends BaseListPage {
newWebhook() {
const randomName = Setting.getRandomName();
return {
@ -31,6 +29,7 @@ class WebhookListPage extends BaseListPage {
name: `webhook_${randomName}`,
createdTime: moment().format(),
url: "https://example.com/callback",
method: "POST",
contentType: "application/json",
events: ["signup", "login", "logout", "update-user"],
organization: "built-in",
@ -125,11 +124,19 @@ class WebhookListPage extends BaseListPage {
)
}
},
{
title: i18next.t("webhook:Method"),
dataIndex: 'method',
key: 'method',
width: '120px',
sorter: true,
...this.getColumnSearchProps('method'),
},
{
title: i18next.t("webhook:Content type"),
dataIndex: 'contentType',
key: 'contentType',
width: '150px',
width: '200px',
sorter: true,
filterMultiple: false,
filters: [