mirror of
https://github.com/strapi/strapi.git
synced 2025-07-30 20:39:05 +00:00
14 lines
386 B
JavaScript
14 lines
386 B
JavaScript
const _ = require('lodash');
|
|
|
|
module.exports = async (ctx, next) => {
|
|
const { source } = ctx.request.query;
|
|
|
|
ctx.request.query.redirectQuery = {};
|
|
|
|
if (source && _.get(strapi.plugins, [source, 'config', 'layout', 'actions', ctx.request.route.action])) {
|
|
ctx.request.query.redirectQuery = _.get(strapi.plugins, [source, 'config', 'layout', 'actions']);
|
|
}
|
|
|
|
await next();
|
|
};
|