fix: add send email content length limits

This commit is contained in:
oiov
2025-11-20 11:09:49 +08:00
parent 33f7b3f653
commit 02ef7a627e
5 changed files with 2564 additions and 4 deletions

View File

@@ -45,13 +45,17 @@ export function SendEmailModal({
toast.error("No email address selected");
return;
}
console.log("sendForm", sendForm);
// return;
if (!sendForm.to || !sendForm.subject || !sendForm.html) {
toast.error("Please fill in all required fields");
return;
}
if (sendForm.text.trim().length < 10) {
toast.error("Email content must be at least 10 characters");
return;
}
startTransition(async () => {
try {
const response = await fetch("/api/email/send", {

File diff suppressed because one or more lines are too long

2456
public/workbox-8817a5e5.js Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long