@strapi/strapi 4.7.0 → 4.7.2-exp.175f7ac70ee76d6c825e4429e15fc85ee78d23bb
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -19,9 +19,8 @@ const createCollectionTypeController = ({ contentType }) => {
|
|
|
19
19
|
* @return {Object|Array}
|
|
20
20
|
*/
|
|
21
21
|
async find(ctx) {
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
const { results, pagination } = await strapi.service(uid).find(query);
|
|
22
|
+
const qp = await this.sanitizeParams(ctx);
|
|
23
|
+
const { results, pagination } = await strapi.service(uid).find(qp);
|
|
25
24
|
const sanitizedResults = await this.sanitizeOutput(results, ctx);
|
|
26
25
|
|
|
27
26
|
return this.transformResponse(sanitizedResults, { pagination });
|
|
@@ -29,6 +29,12 @@ const createController = ({ contentType }) => {
|
|
|
29
29
|
|
|
30
30
|
return sanitize.contentAPI.input(data, contentType, { auth });
|
|
31
31
|
},
|
|
32
|
+
|
|
33
|
+
sanitizeParams(ctx) {
|
|
34
|
+
const auth = getAuthFromKoaContext(ctx);
|
|
35
|
+
|
|
36
|
+
return sanitize.contentAPI.params(ctx.query, contentType, { auth });
|
|
37
|
+
},
|
|
32
38
|
};
|
|
33
39
|
|
|
34
40
|
let ctrl;
|
|
@@ -18,9 +18,9 @@ const createSingleTypeController = ({ contentType }) => {
|
|
|
18
18
|
* @return {Object|Array}
|
|
19
19
|
*/
|
|
20
20
|
async find(ctx) {
|
|
21
|
-
const
|
|
21
|
+
const qp = await this.sanitizeParams(ctx);
|
|
22
|
+
const entity = await strapi.service(uid).find(qp);
|
|
22
23
|
|
|
23
|
-
const entity = await strapi.service(uid).find(query);
|
|
24
24
|
const sanitizedEntity = await this.sanitizeOutput(entity, ctx);
|
|
25
25
|
|
|
26
26
|
return this.transformResponse(sanitizedEntity);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@strapi/strapi",
|
|
3
|
-
"version": "4.7.
|
|
3
|
+
"version": "4.7.2-exp.175f7ac70ee76d6c825e4429e15fc85ee78d23bb",
|
|
4
4
|
"description": "An open source headless CMS solution to create and manage your own API. It provides a powerful dashboard and features to make your life easier. Databases supported: MySQL, MariaDB, PostgreSQL, SQLite",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"strapi",
|
|
@@ -81,24 +81,24 @@
|
|
|
81
81
|
"dependencies": {
|
|
82
82
|
"@koa/cors": "3.4.3",
|
|
83
83
|
"@koa/router": "10.1.1",
|
|
84
|
-
"@strapi/admin": "4.7.
|
|
85
|
-
"@strapi/data-transfer": "4.7.
|
|
86
|
-
"@strapi/database": "4.7.
|
|
87
|
-
"@strapi/generate-new": "4.7.
|
|
88
|
-
"@strapi/generators": "4.7.
|
|
89
|
-
"@strapi/logger": "4.7.
|
|
90
|
-
"@strapi/permissions": "4.7.
|
|
91
|
-
"@strapi/plugin-content-manager": "4.7.
|
|
92
|
-
"@strapi/plugin-content-type-builder": "4.7.
|
|
93
|
-
"@strapi/plugin-email": "4.7.
|
|
94
|
-
"@strapi/plugin-upload": "4.7.
|
|
95
|
-
"@strapi/typescript-utils": "4.7.
|
|
96
|
-
"@strapi/utils": "4.7.
|
|
84
|
+
"@strapi/admin": "4.7.2-exp.175f7ac70ee76d6c825e4429e15fc85ee78d23bb",
|
|
85
|
+
"@strapi/data-transfer": "4.7.2-exp.175f7ac70ee76d6c825e4429e15fc85ee78d23bb",
|
|
86
|
+
"@strapi/database": "4.7.2-exp.175f7ac70ee76d6c825e4429e15fc85ee78d23bb",
|
|
87
|
+
"@strapi/generate-new": "4.7.2-exp.175f7ac70ee76d6c825e4429e15fc85ee78d23bb",
|
|
88
|
+
"@strapi/generators": "4.7.2-exp.175f7ac70ee76d6c825e4429e15fc85ee78d23bb",
|
|
89
|
+
"@strapi/logger": "4.7.2-exp.175f7ac70ee76d6c825e4429e15fc85ee78d23bb",
|
|
90
|
+
"@strapi/permissions": "4.7.2-exp.175f7ac70ee76d6c825e4429e15fc85ee78d23bb",
|
|
91
|
+
"@strapi/plugin-content-manager": "4.7.2-exp.175f7ac70ee76d6c825e4429e15fc85ee78d23bb",
|
|
92
|
+
"@strapi/plugin-content-type-builder": "4.7.2-exp.175f7ac70ee76d6c825e4429e15fc85ee78d23bb",
|
|
93
|
+
"@strapi/plugin-email": "4.7.2-exp.175f7ac70ee76d6c825e4429e15fc85ee78d23bb",
|
|
94
|
+
"@strapi/plugin-upload": "4.7.2-exp.175f7ac70ee76d6c825e4429e15fc85ee78d23bb",
|
|
95
|
+
"@strapi/typescript-utils": "4.7.2-exp.175f7ac70ee76d6c825e4429e15fc85ee78d23bb",
|
|
96
|
+
"@strapi/utils": "4.7.2-exp.175f7ac70ee76d6c825e4429e15fc85ee78d23bb",
|
|
97
97
|
"bcryptjs": "2.4.3",
|
|
98
98
|
"boxen": "5.1.2",
|
|
99
99
|
"chalk": "4.1.2",
|
|
100
100
|
"chokidar": "3.5.2",
|
|
101
|
-
"ci-info": "3.
|
|
101
|
+
"ci-info": "3.8.0",
|
|
102
102
|
"cli-table3": "0.6.2",
|
|
103
103
|
"commander": "8.3.0",
|
|
104
104
|
"configstore": "5.0.1",
|
|
@@ -142,5 +142,5 @@
|
|
|
142
142
|
"node": ">=14.19.1 <=18.x.x",
|
|
143
143
|
"npm": ">=6.0.0"
|
|
144
144
|
},
|
|
145
|
-
"gitHead": "
|
|
145
|
+
"gitHead": "175f7ac70ee76d6c825e4429e15fc85ee78d23bb"
|
|
146
146
|
}
|