File tree 2 files changed +2
-3
lines changed
strapi-plugin-protected-populate
2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " strapi-plugin-protected-populate" ,
3
- "version" : " 2.0.0 " ,
3
+ "version" : " 2.0.1 " ,
4
4
"description" : " Protects your populates from the url against bad actors." ,
5
5
"strapi" : {
6
6
"name" : " protected-populate" ,
Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ module.exports = ({ strapi }) => {
6
6
const fileData = fs . readFileSync ( strapi . dirs . app . src + `/protected-populate/index.json` , {
7
7
encoding : 'utf8' ,
8
8
} ) ;
9
- console . log ( strapi . plugins )
10
9
strapi . plugin ( 'protected-populate' ) . protectedRoutes = JSON . parse ( fileData ) ;
11
10
} else {
12
11
strapi . plugin ( 'protected-populate' ) . protectedRoutes = { } ;
@@ -118,7 +117,7 @@ module.exports = ({ strapi }) => {
118
117
pathApiSplit . splice ( 0 , 2 ) ;
119
118
const pathApi = '/' + pathApiSplit . join ( '/' ) ;
120
119
let routes = [ ] ;
121
- for ( const [ _ , api ] of Object . entries ( strapi . api ) ) {
120
+ for ( const [ _ , api ] of Object . entries ( strapi . apis ) ) {
122
121
for ( const [ _ , route ] of Object . entries ( api . routes ) ) {
123
122
routes . push ( route . routes ) ;
124
123
}
You can’t perform that action at this time.
0 commit comments