mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-07-06 14:35:26 +02:00
refactor: clean up code formatting and improve error handling in job scheduling
- Simplified code formatting for better readability in various components. - Updated job scheduling functions to handle errors gracefully, ensuring that failures in scheduling do not disrupt the overall process. - Enhanced logging for better traceability of job scheduling issues. These changes improve code maintainability and user experience by providing clearer error messages and more organized code structure.
This commit is contained in:
@@ -205,7 +205,10 @@ export const stripeRouter = createTRPCRouter({
|
||||
mode: "subscription",
|
||||
line_items: items,
|
||||
...(stripeCustomerId
|
||||
? { customer: stripeCustomerId, customer_update: { name: "auto", address: "auto" } }
|
||||
? {
|
||||
customer: stripeCustomerId,
|
||||
customer_update: { name: "auto", address: "auto" },
|
||||
}
|
||||
: { customer_email: owner.email }),
|
||||
metadata: {
|
||||
adminId: owner.id,
|
||||
|
||||
@@ -32,10 +32,7 @@ export const sendInvoiceEmail = async (
|
||||
if (!invoice.hosted_invoice_url) return;
|
||||
|
||||
try {
|
||||
const amountFormatted = formatAmount(
|
||||
invoice.amount_paid,
|
||||
invoice.currency,
|
||||
);
|
||||
const amountFormatted = formatAmount(invoice.amount_paid, invoice.currency);
|
||||
|
||||
const htmlContent = await renderAsync(
|
||||
InvoiceNotificationEmail({
|
||||
@@ -85,10 +82,7 @@ export const sendPaymentFailedEmail = async (
|
||||
if (!invoice.hosted_invoice_url) return;
|
||||
|
||||
try {
|
||||
const amountFormatted = formatAmount(
|
||||
invoice.amount_due,
|
||||
invoice.currency,
|
||||
);
|
||||
const amountFormatted = formatAmount(invoice.amount_due, invoice.currency);
|
||||
|
||||
const htmlContent = await renderAsync(
|
||||
PaymentFailedEmail({
|
||||
|
||||
Reference in New Issue
Block a user