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