change consumer

This commit is contained in:
Emily
2025-01-31 14:58:46 +01:00
parent 0dd94be6e6
commit 487c3ac7b4
24 changed files with 531 additions and 47 deletions

View File

@@ -0,0 +1,19 @@
import { EmailServerInfo } from './shared/services/EmailService'
import axios from 'axios';
const EMAIL_SECRET = process.env.EMAIL_SECRET;
export class EmailServiceHelper {
static async sendEmail(data: EmailServerInfo) {
try {
await axios(data.url, {
method: 'POST',
data: data.body,
headers: { ...data.headers, 'x-litlyx-token': EMAIL_SECRET }
})
} catch (ex) {
console.error(ex);
}
}
}