Fix endpoint option coalescing

This commit is contained in:
Marshall Polaris 2022-07-11 13:42:29 -07:00
parent b04276f7d1
commit 4b7ac9abae

View File

@ -113,7 +113,7 @@ const DEFAULT_OPTS = {
}
export const newEndpoint = (endpointOpts: EndpointOptions, fn: Handler) => {
const opts = Object.assign(endpointOpts, DEFAULT_OPTS)
const opts = Object.assign({}, DEFAULT_OPTS, endpointOpts)
return onRequest(opts, async (req, res) => {
log('Request processing started.')
try {