Commit 360619f0 authored by alain's avatar alain 🐙
Browse files

add alternative post type / menu items settings

parent 9c859887
{
"routes": [
{
"method": "GET",
"path": "/alternatives",
"handler": "alternative.find",
"config": {
"policies": []
}
},
{
"method": "GET",
"path": "/alternatives/count",
"handler": "alternative.count",
"config": {
"policies": []
}
},
{
"method": "GET",
"path": "/alternatives/:id",
"handler": "alternative.findOne",
"config": {
"policies": []
}
},
{
"method": "POST",
"path": "/alternatives",
"handler": "alternative.create",
"config": {
"policies": []
}
},
{
"method": "PUT",
"path": "/alternatives/:id",
"handler": "alternative.update",
"config": {
"policies": []
}
},
{
"method": "DELETE",
"path": "/alternatives/:id",
"handler": "alternative.delete",
"config": {
"policies": []
}
}
]
}
......@@ -5,12 +5,4 @@
* to customize this model
*/
module.exports = {
lifecycles: {
async afterUpdate() {
strapi.services.util.build()
},
},
};
module.exports = {};
{
"kind": "collectionType",
"collectionName": "solutions",
"collectionName": "alternatives",
"info": {
"name": "Solution"
"name": "Alternative"
},
"options": {
"increments": true,
......@@ -10,12 +10,7 @@
},
"attributes": {
"title": {
"type": "string",
"required": true,
"unique": true
},
"description": {
"type": "richtext"
"type": "string"
}
}
}
......@@ -2,48 +2,48 @@
"routes": [
{
"method": "GET",
"path": "/solutions",
"handler": "solution.find",
"path": "/menu-items",
"handler": "menu-item.find",
"config": {
"policies": []
}
},
{
"method": "GET",
"path": "/solutions/count",
"handler": "solution.count",
"path": "/menu-items/count",
"handler": "menu-item.count",
"config": {
"policies": []
}
},
{
"method": "GET",
"path": "/solutions/:id",
"handler": "solution.findOne",
"path": "/menu-items/:id",
"handler": "menu-item.findOne",
"config": {
"policies": []
}
},
{
"method": "POST",
"path": "/solutions",
"handler": "solution.create",
"path": "/menu-items",
"handler": "menu-item.create",
"config": {
"policies": []
}
},
{
"method": "PUT",
"path": "/solutions/:id",
"handler": "solution.update",
"path": "/menu-items/:id",
"handler": "menu-item.update",
"config": {
"policies": []
}
},
{
"method": "DELETE",
"path": "/solutions/:id",
"handler": "solution.delete",
"path": "/menu-items/:id",
"handler": "menu-item.delete",
"config": {
"policies": []
}
......
'use strict';
/**
* Read the documentation (https://strapi.io/documentation/v3.x/concepts/controllers.html#core-controllers)
* to customize this controller
*/
module.exports = {};
'use strict';
/**
* Read the documentation (https://strapi.io/documentation/v3.x/concepts/models.html#lifecycle-hooks)
* to customize this model
*/
module.exports = {};
{
"kind": "collectionType",
"collectionName": "menu_items",
"info": {
"name": "Menu item"
},
"options": {
"increments": true,
"timestamps": true
},
"attributes": {
"title": {
"type": "string"
},
"subtitle": {
"type": "string"
},
"link": {
"type": "string"
},
"type": {
"type": "enumeration",
"enum": [
"primary",
"secondary"
]
}
}
}
'use strict';
/**
* Read the documentation (https://strapi.io/documentation/v3.x/concepts/services.html#core-services)
* to customize this service
*/
module.exports = {};
......@@ -16,9 +16,6 @@
},
"description": {
"type": "richtext"
},
"solutions": {
"collection": "solution"
}
}
}
......@@ -6,6 +6,7 @@ module.exports = {
},
plugins: [
`gatsby-plugin-react-helmet`,
`gatsby-plugin-sass`,
{
resolve: `gatsby-source-filesystem`,
options: {
......@@ -18,9 +19,10 @@ module.exports = {
options: {
apiURL: process.env.API_URL || 'http://localhost:1337',
contentTypes: [
'menu-item',
'domain',
'use-case',
'solution'
'alternative'
],
queryLimit: 1000
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment