chore: local api sdk for e2e tests

This commit is contained in:
James
2024-04-01 21:53:30 -04:00
parent cd553d45cc
commit 94d0e28ad7
10 changed files with 273 additions and 13 deletions

View File

@@ -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(),