Skip to content

Commit

Permalink
Merge pull request #24 from strapi-community/v5-main
Browse files Browse the repository at this point in the history
v2.0.1
  • Loading branch information
Boegie19 authored Dec 22, 2024
2 parents 0d1bcb8 + f56c7f0 commit 625b9fc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion strapi-plugin-protected-populate/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "strapi-plugin-protected-populate",
"version": "2.0.0",
"version": "2.0.1",
"description": "Protects your populates from the url against bad actors.",
"strapi": {
"name": "protected-populate",
Expand Down
3 changes: 1 addition & 2 deletions strapi-plugin-protected-populate/server/src/register.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ module.exports = ({ strapi }) => {
const fileData = fs.readFileSync(strapi.dirs.app.src + `/protected-populate/index.json`, {
encoding: 'utf8',
});
console.log(strapi.plugins)
strapi.plugin('protected-populate').protectedRoutes = JSON.parse(fileData);
} else {
strapi.plugin('protected-populate').protectedRoutes = {};
Expand Down Expand Up @@ -118,7 +117,7 @@ module.exports = ({ strapi }) => {
pathApiSplit.splice(0, 2);
const pathApi = '/' + pathApiSplit.join('/');
let routes = [];
for (const [_, api] of Object.entries(strapi.api)) {
for (const [_, api] of Object.entries(strapi.apis)) {
for (const [_, route] of Object.entries(api.routes)) {
routes.push(route.routes);
}
Expand Down

0 comments on commit 625b9fc

Please sign in to comment.