test: clean up email-nodemailer config
This commit is contained in:
@@ -1,14 +1,8 @@
|
||||
import { createNodemailerAdapter } from '@payloadcms/email-nodemailer'
|
||||
import path from 'path'
|
||||
import { getFileByPath } from 'payload/uploads'
|
||||
import { fileURLToPath } from 'url'
|
||||
|
||||
import { buildConfigWithDefaults } from '../buildConfigWithDefaults.js'
|
||||
import { devUser } from '../credentials.js'
|
||||
|
||||
const filename = fileURLToPath(import.meta.url)
|
||||
const dirname = path.dirname(filename)
|
||||
|
||||
export default buildConfigWithDefaults({
|
||||
// ...extend config here
|
||||
collections: [],
|
||||
@@ -27,14 +21,6 @@ export default buildConfigWithDefaults({
|
||||
subject: 'This was sent on init',
|
||||
})
|
||||
|
||||
// Create image
|
||||
const imageFilePath = path.resolve(dirname, '../uploads/image.png')
|
||||
const imageFile = await getFileByPath(imageFilePath)
|
||||
|
||||
await payload.create({
|
||||
collection: 'media',
|
||||
data: {},
|
||||
file: imageFile,
|
||||
})
|
||||
payload.logger.info({ msg: 'Email sent', email })
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user