Skip to content
This repository was archived by the owner on Jul 30, 2023. It is now read-only.

Commit df9addc

Browse files
committed
Fix controllers
1 parent a7b1456 commit df9addc

File tree

11 files changed

+30
-41
lines changed

11 files changed

+30
-41
lines changed
Binary file not shown.

apps/blog/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"gatsby-plugin-sharp": "4.7.0",
4444
"gatsby-plugin-webpack-bundle-analyzer": "1.0.5",
4545
"gatsby-source-filesystem": "4.7.0",
46-
"gatsby-source-strapi": "1.0.3",
46+
"gatsby-source-strapi": "2.0.0",
4747
"gatsby-transformer-remark": "5.7.0",
4848
"gatsby-transformer-sharp": "4.7.0",
4949
"graphql": "16.6.0",

apps/cms/config/server.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module.exports = ({ env }) => ({
22
host: env('HOST', '0.0.0.0'),
33
port: env.int('PORT', 1337),
44
app: {
5-
keys: env.array('APP_KEYS'),
5+
keys: env.array('APP_KEYS', ['testKey1', 'testKey2']),
66
},
77
webhooks: {
88
defaultHeaders: {

apps/cms/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"@strapi/plugin-content-type-builder": "4.3.8",
2323
"@strapi/plugin-email": "4.3.8",
2424
"@strapi/plugin-graphql": "4.3.8",
25+
"@strapi/plugin-i18n": "4.3.8",
2526
"@strapi/plugin-upload": "4.3.8",
2627
"@strapi/plugin-users-permissions": "4.3.8",
2728
"@strapi/strapi": "4.3.8",
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
'use strict'
22

3+
const { createCoreController } = require('@strapi/strapi').factories
4+
35
/**
46
* Read the documentation (https://strapi.io/documentation/developer-docs/latest/concepts/controllers.html#core-controllers)
57
* to customize this controller
68
*/
79

8-
module.exports = {}
10+
module.exports = createCoreController('api::article.article')
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
'use strict'
22

3+
const { createCoreController } = require('@strapi/strapi').factories
4+
35
/**
46
* Read the documentation (https://strapi.io/documentation/developer-docs/latest/concepts/controllers.html#core-controllers)
57
* to customize this controller
68
*/
79

8-
module.exports = {}
10+
module.exports = createCoreController('api::category.category')
+3-34
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,3 @@
1-
module.exports = {
2-
routes: [
3-
{
4-
method: 'GET',
5-
path: '/categories',
6-
handler: 'category.find',
7-
config: { policies: [] },
8-
},
9-
{
10-
method: 'GET',
11-
path: '/categories/:id',
12-
handler: 'category.findOne',
13-
config: { policies: [] },
14-
},
15-
{
16-
method: 'POST',
17-
path: '/categories',
18-
handler: 'category.create',
19-
config: { policies: [] },
20-
},
21-
{
22-
method: 'PUT',
23-
path: '/categories/:id',
24-
handler: 'category.update',
25-
config: { policies: [] },
26-
},
27-
{
28-
method: 'DELETE',
29-
path: '/categories/:id',
30-
handler: 'category.delete',
31-
config: { policies: [] },
32-
},
33-
],
34-
}
1+
const { createCoreRouter } = require('@strapi/strapi').factories
2+
3+
module.exports = createCoreRouter('api::category.category')

apps/cms/src/api/deploy/routes/deploy.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module.exports = {
44
method: 'POST',
55
path: '/deploy',
66
handler: 'deploy.run',
7-
config: { policies: ['withDeployKey'] },
7+
// config: { policies: ['api::deploy.withDeployKey'] },
88
},
99
],
1010
}
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
'use strict'
22

3+
const { createCoreController } = require('@strapi/strapi').factories
4+
35
/**
46
* Read the documentation (https://strapi.io/documentation/developer-docs/latest/concepts/controllers.html#core-controllers)
57
* to customize this controller
68
*/
79

8-
module.exports = {}
10+
module.exports = createCoreController('api::recipe.recipe')
+3-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
'use strict'
22

3+
const { createCoreController } = require('@strapi/strapi').factories
4+
35
/**
46
* Read the documentation (https://strapi.io/documentation/developer-docs/latest/concepts/controllers.html#core-controllers)
57
* to customize this controller
68
*/
79

8-
module.exports = {}
10+
module.exports = createCoreController('api::tag.tag')

yarn.lock

+11
Original file line numberDiff line numberDiff line change
@@ -9277,6 +9277,16 @@ __metadata:
92779277
languageName: node
92789278
linkType: hard
92799279

9280+
"@strapi/plugin-i18n@npm:4.3.8":
9281+
version: 4.3.8
9282+
resolution: "@strapi/plugin-i18n@npm:4.3.8"
9283+
dependencies:
9284+
"@strapi/utils": 4.3.8
9285+
lodash: 4.17.21
9286+
checksum: 9793d731b98149ed60580c67424682e5c82846f301f4bc52ebecd6e800e3b2dbec3fdd294a2d0703aea51508ef9cf6b55c945be75e5e2f46815bde7228a82afa
9287+
languageName: node
9288+
linkType: hard
9289+
92809290
"@strapi/plugin-upload@npm:4.3.8":
92819291
version: 4.3.8
92829292
resolution: "@strapi/plugin-upload@npm:4.3.8"
@@ -14920,6 +14930,7 @@ __metadata:
1492014930
"@strapi/plugin-content-type-builder": 4.3.8
1492114931
"@strapi/plugin-email": 4.3.8
1492214932
"@strapi/plugin-graphql": 4.3.8
14933+
"@strapi/plugin-i18n": 4.3.8
1492314934
"@strapi/plugin-upload": 4.3.8
1492414935
"@strapi/plugin-users-permissions": 4.3.8
1492514936
"@strapi/strapi": 4.3.8

0 commit comments

Comments
 (0)