chore: ensures onInit is called after initHTTP
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
/* eslint-disable no-param-reassign */
|
||||
import express, { NextFunction, Response } from 'express';
|
||||
import { Config as GeneratedTypes } from 'payload/generated-types';
|
||||
import { InitOptions } from './config/types';
|
||||
|
||||
import authenticate from './express/middleware/authenticate';
|
||||
@@ -22,6 +21,7 @@ import mountEndpoints from './express/mountEndpoints';
|
||||
import { Payload, getPayload } from './payload';
|
||||
|
||||
export const initHTTP = async (options: InitOptions): Promise<Payload> => {
|
||||
options.local = false;
|
||||
const payload = await getPayload(options);
|
||||
|
||||
if (!options.local) {
|
||||
|
||||
Reference in New Issue
Block a user