mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-06 06:29:58 +08:00
chore(style): allow case declarations and ban var
(#987)
* chore(style): allow case declarations * chore(style): ban `var` and prefer `const`
This commit is contained in:
@ -133,7 +133,7 @@ class WebhookEditPage extends React.Component {
|
||||
updateWebhookField(key, value) {
|
||||
value = this.parseWebhookField(key, value);
|
||||
|
||||
let webhook = this.state.webhook;
|
||||
const webhook = this.state.webhook;
|
||||
webhook[key] = value;
|
||||
this.setState({
|
||||
webhook: webhook,
|
||||
@ -141,7 +141,7 @@ class WebhookEditPage extends React.Component {
|
||||
}
|
||||
|
||||
renderWebhook() {
|
||||
let preview = Setting.deepCopy(previewTemplate);
|
||||
const preview = Setting.deepCopy(previewTemplate);
|
||||
if (this.state.webhook.isUserExtended) {
|
||||
preview["extendedUser"] = userTemplate;
|
||||
}
|
||||
@ -293,7 +293,7 @@ class WebhookEditPage extends React.Component {
|
||||
}
|
||||
|
||||
submitWebhookEdit(willExist) {
|
||||
let webhook = Setting.deepCopy(this.state.webhook);
|
||||
const webhook = Setting.deepCopy(this.state.webhook);
|
||||
WebhookBackend.updateWebhook(this.state.webhook.owner, this.state.webhookName, webhook)
|
||||
.then((res) => {
|
||||
if (res.msg === "") {
|
||||
|
Reference in New Issue
Block a user