chore: local api sdk for e2e tests
This commit is contained in:
@@ -29,6 +29,8 @@ import { MongoMemoryReplSet } from 'mongodb-memory-server'
|
||||
// import { slateEditor } from '@payloadcms/richtext-slate'
|
||||
import { type Config, buildConfig } from 'payload/config'
|
||||
import sharp from 'sharp'
|
||||
|
||||
import { localAPIHandler } from './helpers/sdk/handler.js'
|
||||
// process.env.PAYLOAD_DATABASE = 'postgres'
|
||||
|
||||
const databaseAdapters = {
|
||||
@@ -105,6 +107,13 @@ export async function buildConfigWithDefaults(
|
||||
// },
|
||||
// },
|
||||
// }),
|
||||
endpoints: [
|
||||
{
|
||||
path: '/local-api',
|
||||
method: 'post',
|
||||
handler: localAPIHandler,
|
||||
},
|
||||
],
|
||||
editor: lexicalEditor({
|
||||
features: [
|
||||
ParagraphFeature(),
|
||||
|
||||
Reference in New Issue
Block a user