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:
q1anx1
2022-08-08 23:35:24 +08:00
committed by GitHub
parent 802995ed16
commit deed857788
65 changed files with 187 additions and 182 deletions

View File

@ -29,7 +29,7 @@ export function getWebhook(owner, name) {
}
export function updateWebhook(owner, name, webhook) {
let newWebhook = Setting.deepCopy(webhook);
const newWebhook = Setting.deepCopy(webhook);
return fetch(`${Setting.ServerUrl}/api/update-webhook?id=${owner}/${encodeURIComponent(name)}`, {
method: "POST",
credentials: "include",
@ -38,7 +38,7 @@ export function updateWebhook(owner, name, webhook) {
}
export function addWebhook(webhook) {
let newWebhook = Setting.deepCopy(webhook);
const newWebhook = Setting.deepCopy(webhook);
return fetch(`${Setting.ServerUrl}/api/add-webhook`, {
method: "POST",
credentials: "include",
@ -47,7 +47,7 @@ export function addWebhook(webhook) {
}
export function deleteWebhook(webhook) {
let newWebhook = Setting.deepCopy(webhook);
const newWebhook = Setting.deepCopy(webhook);
return fetch(`${Setting.ServerUrl}/api/delete-webhook`, {
method: "POST",
credentials: "include",