Remove redundant queueName validation and debug log, bump version to 0.1.24

This commit is contained in:
2025-09-14 16:28:24 +02:00
parent aa978090fa
commit 63a7eef8d8
3 changed files with 1 additions and 8 deletions

View File

@@ -9,12 +9,6 @@ import { mailingJobs, scheduleEmailsJob } from './jobs/index.js'
export const mailingPlugin = (pluginConfig: MailingPluginConfig) => (config: Config): Config => {
const queueName = pluginConfig.queue || 'default'
// Validate queueName
if (!queueName || typeof queueName !== 'string') {
throw new Error('Invalid queue configuration: queue must be a non-empty string')
}
// Handle templates collection configuration
const templatesConfig = pluginConfig.collections?.templates
const templatesSlug = typeof templatesConfig === 'string' ? templatesConfig : 'email-templates'

View File

@@ -45,7 +45,6 @@ export class MailingService implements IMailingService {
// Use Payload's configured mailer (cast to any to handle different adapter types)
this.transporter = this.payload.email as any
} else {
console.log('[DEBUG] email: ', this.payload.email);
throw new Error('Email transport configuration is required either in plugin config or Payload config')
}