mirror of
https://github.com/strapi/strapi.git
synced 2025-08-18 05:37:10 +00:00
Route to get layout to apply
This commit is contained in:
parent
adb104f666
commit
b4be337249
@ -1,5 +1,13 @@
|
||||
{
|
||||
"routes": [
|
||||
{
|
||||
"method": "GET",
|
||||
"path": "/layout",
|
||||
"handler": "ContentManager.layout",
|
||||
"config": {
|
||||
"policies": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"path": "/models",
|
||||
|
@ -7,6 +7,12 @@ const _ = require('lodash');
|
||||
*/
|
||||
|
||||
module.exports = {
|
||||
layout: async (ctx) => {
|
||||
const {source} = ctx.query;
|
||||
|
||||
return ctx.send(_.get(strapi.plugins, [source, 'config', 'layout'], {}));
|
||||
},
|
||||
|
||||
models: async ctx => {
|
||||
const pickData = (model) => _.pick(model, [
|
||||
'info',
|
||||
|
Loading…
x
Reference in New Issue
Block a user