ensures payload is passed through local find operation
This commit is contained in:
@@ -22,6 +22,7 @@ async function find(options) {
|
|||||||
payloadAPI: 'local',
|
payloadAPI: 'local',
|
||||||
locale,
|
locale,
|
||||||
fallbackLocale,
|
fallbackLocale,
|
||||||
|
payload: this,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ const middleware = (payload) => [
|
|||||||
}),
|
}),
|
||||||
(req, _, next) => {
|
(req, _, next) => {
|
||||||
req.payload = payload;
|
req.payload = payload;
|
||||||
return next();
|
next();
|
||||||
},
|
},
|
||||||
(req, res, next) => {
|
(req, res, next) => {
|
||||||
if (payload.config.cors) {
|
if (payload.config.cors) {
|
||||||
|
|||||||
Reference in New Issue
Block a user