Skip to content

Commit 625b9fc

Browse files
authored
Merge pull request #24 from strapi-community/v5-main
v2.0.1
2 parents 0d1bcb8 + f56c7f0 commit 625b9fc

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

strapi-plugin-protected-populate/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "strapi-plugin-protected-populate",
3-
"version": "2.0.0",
3+
"version": "2.0.1",
44
"description": "Protects your populates from the url against bad actors.",
55
"strapi": {
66
"name": "protected-populate",

strapi-plugin-protected-populate/server/src/register.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ module.exports = ({ strapi }) => {
66
const fileData = fs.readFileSync(strapi.dirs.app.src + `/protected-populate/index.json`, {
77
encoding: 'utf8',
88
});
9-
console.log(strapi.plugins)
109
strapi.plugin('protected-populate').protectedRoutes = JSON.parse(fileData);
1110
} else {
1211
strapi.plugin('protected-populate').protectedRoutes = {};
@@ -118,7 +117,7 @@ module.exports = ({ strapi }) => {
118117
pathApiSplit.splice(0, 2);
119118
const pathApi = '/' + pathApiSplit.join('/');
120119
let routes = [];
121-
for (const [_, api] of Object.entries(strapi.api)) {
120+
for (const [_, api] of Object.entries(strapi.apis)) {
122121
for (const [_, route] of Object.entries(api.routes)) {
123122
routes.push(route.routes);
124123
}

0 commit comments

Comments
 (0)