mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-05 05:41:46 +08:00
feat(web): add lint (#875)
* feat: add lint * feat: fix lint error * chore: add ignore file * chore: close indent
This commit is contained in:
@ -18,7 +18,7 @@ export function sendTestEmail(provider, email) {
|
||||
testEmailProvider(provider, email)
|
||||
.then((res) => {
|
||||
if (res.msg === "") {
|
||||
Setting.showMessage("success", `Successfully send email`);
|
||||
Setting.showMessage("success", "Successfully send email");
|
||||
} else {
|
||||
Setting.showMessage("error", res.msg);
|
||||
}
|
||||
@ -32,7 +32,7 @@ export function connectSmtpServer(provider) {
|
||||
testEmailProvider(provider)
|
||||
.then((res) => {
|
||||
if (res.msg === "") {
|
||||
Setting.showMessage("success", `Successfully connecting smtp server`);
|
||||
Setting.showMessage("success", "Successfully connecting smtp server");
|
||||
} else {
|
||||
Setting.showMessage("error", res.msg);
|
||||
}
|
||||
@ -49,11 +49,11 @@ function testEmailProvider(provider, email = "") {
|
||||
sender: provider.displayName,
|
||||
receivers: email === "" ? ["TestSmtpServer"] : [email],
|
||||
provider: provider.name,
|
||||
}
|
||||
};
|
||||
|
||||
return fetch(`${Setting.ServerUrl}/api/send-email`, {
|
||||
method: "POST",
|
||||
credentials: "include",
|
||||
body: JSON.stringify(emailForm)
|
||||
}).then(res => res.json());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user