mirror of
https://github.com/xtr-dev/payload-mailing.git
synced 2025-12-10 00:03:23 +00:00
Fix broken development routes and imports
Critical fixes: - Update dev/app/api/test-email/route.ts to use new sendEmail API instead of deprecated sendEmail/scheduleEmail - Fix dev/test-plugin.mjs imports to remove scheduleEmail reference - Update dev/README.md examples to use new sendEmail pattern - Replace templateId with template.slug throughout dev examples - Add support for direct HTML emails in test route The development routes now work correctly with v0.1.5 API changes. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
// Simple test to verify plugin can be imported and initialized
|
||||
import { mailingPlugin, sendEmail, scheduleEmail } from '@xtr-dev/payload-mailing'
|
||||
import { mailingPlugin, sendEmail, renderTemplate } from '@xtr-dev/payload-mailing'
|
||||
|
||||
console.log('✅ Plugin imports successfully')
|
||||
console.log('✅ mailingPlugin:', typeof mailingPlugin)
|
||||
console.log('✅ sendEmail:', typeof sendEmail)
|
||||
console.log('✅ scheduleEmail:', typeof scheduleEmail)
|
||||
console.log('✅ sendEmail:', typeof sendEmail)
|
||||
console.log('✅ renderTemplate:', typeof renderTemplate)
|
||||
|
||||
// Test plugin configuration
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user