56 lines
1.1 KiB
JavaScript
Raw Normal View History

2019-07-04 11:32:51 +02:00
module.exports = {
getGeneralSettings: ctx => {
const generalSettings = {
bulkActions: true,
filters: true,
pageEntries: 10,
search: true,
};
ctx.body = { generalSettings };
},
getGroups: ctx => {
const groups = [
{
name: 'ingredient',
},
{
name: 'car',
},
];
ctx.body = { groups };
},
getModels: ctx => {
const models = [
{
name: 'article',
label: 'Article',
destination: 'article',
},
{
name: 'administrator',
label: 'Administrator',
destination: 'administrator',
source: 'admin', // this should be removed at some point
isDisplayed: false,
},
{
name: 'user',
label: 'Users',
destination: 'user',
source: 'users-permissions', // this should be removed at some point
isDisplayed: true,
},
];
ctx.body = { models };
},
2019-07-04 13:08:31 +02:00
updateGeneralSettings: ctx => {
2019-07-04 15:39:20 +02:00
// Here it should update all the other settings
2019-07-04 13:08:31 +02:00
ctx.body = { ok: true };
},
2019-07-04 11:32:51 +02:00
};