Преглед на файлове

Update test email function

main
MSI\2Fi преди 2 седмици
родител
ревизия
9df72b996e
променени са 2 файла, в които са добавени 14 реда и са изтрити 4 реда
  1. +9
    -1
      src/app/api/mail/actions.ts
  2. +5
    -3
      src/components/MailSetting/MailSetting.tsx

+ 9
- 1
src/app/api/mail/actions.ts Целия файл

@@ -39,4 +39,12 @@ export const test15th = async () => {
// body: JSON.stringify(data),
headers: { "Content-Type": "application/json" },
});
};
};

export const testEmail = async () => {
return serverFetchWithNoContent(`${BASE_API_URL}/mails/test-email`, {
method: "GET",
// body: JSON.stringify(data),
headers: { "Content-Type": "application/json" },
});
};

+ 5
- 3
src/components/MailSetting/MailSetting.tsx Целия файл

@@ -17,7 +17,7 @@ import {
import { Tab, Tabs, TabsProps, Typography } from "@mui/material";
import TimesheetMailDetails from "./TimesheetMailDetails";
import { Error } from "@mui/icons-material";
import { MailSave, saveMail, testEveryone, test7th, test15th } from "@/app/api/mail/actions";
import { MailSave, saveMail, testEveryone, test7th, test15th, testEmail } from "@/app/api/mail/actions";
import SettingDetails from "./SettingDetails";
import { errorDialog, submitDialog, successDialog } from "../Swal/CustomAlerts";

@@ -95,10 +95,12 @@ const MailSetting: React.FC<Props> = ({
try {
// msg = "testEveryone"
// await testEveryone()
msg = "test7th"
await test7th()
// msg = "test7th"
// await test7th()
// msg = "test15th"
// await test15th()
msg = "testEmail"
await testEmail()
} catch (error) {
console.log(error)
console.log(msg)


Зареждане…
Отказ
Запис