File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed
strapi-plugin-protected-populate Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change 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" ,
Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments