mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-04 13:20:19 +08:00
Improve creation UI for pages.
This commit is contained in:
@ -47,14 +47,14 @@ class WebhookListPage extends React.Component {
|
||||
}
|
||||
|
||||
newWebhook() {
|
||||
var randomName = Math.random().toString(36).slice(-6)
|
||||
const randomName = Setting.getRandomName();
|
||||
return {
|
||||
owner: "admin", // this.props.account.webhookname,
|
||||
name: `webhook_${randomName}`,
|
||||
createdTime: moment().format(),
|
||||
url: "https://example.com/callback",
|
||||
contentType: "application/json",
|
||||
events: [],
|
||||
events: ["signup", "login", "logout", "update-user"],
|
||||
organization: "built-in",
|
||||
}
|
||||
}
|
||||
@ -68,6 +68,7 @@ class WebhookListPage extends React.Component {
|
||||
webhooks: Setting.prependRow(this.state.webhooks, newWebhook),
|
||||
total: this.state.total + 1
|
||||
});
|
||||
this.props.history.push(`/webhooks/${newWebhook.name}`);
|
||||
}
|
||||
)
|
||||
.catch(error => {
|
||||
|
Reference in New Issue
Block a user