chore: normalize configuration casing

This commit is contained in:
eoao
2026-05-10 17:26:23 +08:00
parent f227bd75ca
commit 53c4db3bc9
7 changed files with 23 additions and 20 deletions

View File

@@ -7,7 +7,7 @@ const aiService = {
return '';
}
const ai = c.env.AI;
const ai = c.env.ai;
try {
const subject = email.subject || '';

View File

@@ -231,7 +231,7 @@ const emailService = {
const domain = emailUtils.getDomain(accountRow.email);
const resendToken = resendTokens[domain];
const useCloudflareEmail = !!c.env.EMAIL;
const useCloudflareEmail = !!c.env.email;
//如果接收方存在站外邮箱,又没有发信服务
if (!useCloudflareEmail && !resendToken && !allInternal) {
@@ -404,7 +404,7 @@ const emailService = {
console.log(sendForm)
const result = await c.env.EMAIL.send(sendForm);
const result = await c.env.email.send(sendForm);
return {
data: {

View File

@@ -101,7 +101,7 @@ const settingService = {
settingRow.s3AccessKey = settingRow.s3AccessKey ? `${settingRow.s3AccessKey.slice(0, 12)}******` : null;
settingRow.s3SecretKey = settingRow.s3SecretKey ? `${settingRow.s3SecretKey.slice(0, 12)}******` : null;
settingRow.hasR2 = !!c.env.r2
settingRow.hasCfEmail = !!c.env.EMAIL
settingRow.hasCfEmail = !!c.env.email
let regVerifyOpen = false
let addVerifyOpen = false