"use server"; // import { serverFetchJson, serverFetchWithNoContent } from "@/app/utils/fetchUtil"; // import { BASE_API_URL } from "@/config/api"; import { serverFetchJson, serverFetchWithNoContent } from "../../utils/fetchUtil"; import { BASE_API_URL } from "../../../config/api"; import { MailSetting, MailTemplate } from "."; export interface MailSave { settings: MailSetting[]; templates: MailTemplate[]; // template: MailTemplate; } export const saveMail = async (data: MailSave) => { return serverFetchJson(`${BASE_API_URL}/mails/save`, { method: "POST", body: JSON.stringify(data), headers: { "Content-Type": "application/json" }, }); }; export const testSendMail = async () => { return serverFetchWithNoContent(`${BASE_API_URL}/mails/test-send`, { method: "GET", // body: JSON.stringify(data), headers: { "Content-Type": "application/json" }, }); }; export const testEveryone = async () => { return serverFetchWithNoContent(`${BASE_API_URL}/mails/testEveryone`, { method: "GET", // body: JSON.stringify(data), headers: { "Content-Type": "application/json" }, }); }; export const test7th = async () => { return serverFetchWithNoContent(`${BASE_API_URL}/mails/test7th`, { method: "GET", // body: JSON.stringify(data), headers: { "Content-Type": "application/json" }, }); }; export const test15th = async () => { return serverFetchWithNoContent(`${BASE_API_URL}/mails/test15th`, { method: "GET", // body: JSON.stringify(data), headers: { "Content-Type": "application/json" }, }); };