Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
code
Public Stack Site
Commits
360619f0
Commit
360619f0
authored
Aug 05, 2020
by
alain
🐙
Browse files
add alternative post type / menu items settings
parent
9c859887
Changes
12
Hide whitespace changes
Inline
Side-by-side
backend/api/alternative/config/routes.json
0 → 100644
View file @
360619f0
{
"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"
:
[]
}
}
]
}
backend/api/
solution
/controllers/
solution
.js
→
backend/api/
alternative
/controllers/
alternative
.js
View file @
360619f0
File moved
backend/api/
solution/models/solution
.js
→
backend/api/
alternative/models/alternative
.js
View file @
360619f0
...
...
@@ -5,12 +5,4 @@
* to customize this model
*/
module
.
exports
=
{
lifecycles
:
{
async
afterUpdate
()
{
strapi
.
services
.
util
.
build
()
},
},
};
module
.
exports
=
{};
backend/api/
solution/models/solution
.settings.json
→
backend/api/
alternative/models/alternative
.settings.json
View file @
360619f0
{
"kind"
:
"collectionType"
,
"collectionName"
:
"
solution
s"
,
"collectionName"
:
"
alternative
s"
,
"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"
}
}
}
backend/api/
solution/services/solution
.js
→
backend/api/
alternative/services/alternative
.js
View file @
360619f0
File moved
backend/api/
solution
/config/routes.json
→
backend/api/
menu-item
/config/routes.json
View file @
360619f0
...
...
@@ -2,48 +2,48 @@
"routes"
:
[
{
"method"
:
"GET"
,
"path"
:
"/
solution
s"
,
"handler"
:
"
solution
.find"
,
"path"
:
"/
menu-item
s"
,
"handler"
:
"
menu-item
.find"
,
"config"
:
{
"policies"
:
[]
}
},
{
"method"
:
"GET"
,
"path"
:
"/
solution
s/count"
,
"handler"
:
"
solution
.count"
,
"path"
:
"/
menu-item
s/count"
,
"handler"
:
"
menu-item
.count"
,
"config"
:
{
"policies"
:
[]
}
},
{
"method"
:
"GET"
,
"path"
:
"/
solution
s/:id"
,
"handler"
:
"
solution
.findOne"
,
"path"
:
"/
menu-item
s/:id"
,
"handler"
:
"
menu-item
.findOne"
,
"config"
:
{
"policies"
:
[]
}
},
{
"method"
:
"POST"
,
"path"
:
"/
solution
s"
,
"handler"
:
"
solution
.create"
,
"path"
:
"/
menu-item
s"
,
"handler"
:
"
menu-item
.create"
,
"config"
:
{
"policies"
:
[]
}
},
{
"method"
:
"PUT"
,
"path"
:
"/
solution
s/:id"
,
"handler"
:
"
solution
.update"
,
"path"
:
"/
menu-item
s/:id"
,
"handler"
:
"
menu-item
.update"
,
"config"
:
{
"policies"
:
[]
}
},
{
"method"
:
"DELETE"
,
"path"
:
"/
solution
s/:id"
,
"handler"
:
"
solution
.delete"
,
"path"
:
"/
menu-item
s/:id"
,
"handler"
:
"
menu-item
.delete"
,
"config"
:
{
"policies"
:
[]
}
...
...
backend/api/menu-item/controllers/menu-item.js
0 → 100644
View file @
360619f0
'
use strict
'
;
/**
* Read the documentation (https://strapi.io/documentation/v3.x/concepts/controllers.html#core-controllers)
* to customize this controller
*/
module
.
exports
=
{};
backend/api/menu-item/models/menu-item.js
0 → 100644
View file @
360619f0
'
use strict
'
;
/**
* Read the documentation (https://strapi.io/documentation/v3.x/concepts/models.html#lifecycle-hooks)
* to customize this model
*/
module
.
exports
=
{};
backend/api/menu-item/models/menu-item.settings.json
0 → 100644
View file @
360619f0
{
"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"
]
}
}
}
backend/api/menu-item/services/menu-item.js
0 → 100644
View file @
360619f0
'
use strict
'
;
/**
* Read the documentation (https://strapi.io/documentation/v3.x/concepts/services.html#core-services)
* to customize this service
*/
module
.
exports
=
{};
backend/api/use-case/models/use-case.settings.json
View file @
360619f0
...
...
@@ -16,9 +16,6 @@
},
"description"
:
{
"type"
:
"richtext"
},
"solutions"
:
{
"collection"
:
"solution"
}
}
}
frontend/gatsby-config.js
View file @
360619f0
...
...
@@ -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
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment