refactor(actions): extract shared relay client for direct services

This commit is contained in:
2026-03-25 06:14:23 +00:00
parent 5e51c2eb97
commit 6fa7cf9375
12 changed files with 112 additions and 88 deletions
+6 -3
View File
@@ -1,5 +1,5 @@
import axios from "axios";
import { consoleLogger } from "../core/logger";
import { requestJson } from "../clients/endpointClient";
export const sendEmail = async (
templateId,
@@ -15,8 +15,11 @@ export const sendEmail = async (
};
try {
const response = await axios.post("/api/email/notify", mailData);
return response.data;
return await requestJson({
method: "post",
url: "/api/email/notify",
data: mailData
});
} catch (error) {
consoleLogger(error);
throw error;