File tree Expand file tree Collapse file tree 3 files changed +18
-8
lines changed Expand file tree Collapse file tree 3 files changed +18
-8
lines changed Original file line number Diff line number Diff line change 3232  },
3333  "homepage" : " https://github.com/r-spacex/SpaceX-API"  ,
3434  "dependencies" : {
35-     "@koa/json-filter" : " ^1.0.0"  ,
3635    "cheerio" : " ^1.0.0-rc.2"  ,
3736    "fuzzball" : " ^1.1.5"  ,
3837    "koa" : " ^2.5.3"  ,
3938    "koa-bodyparser" : " ^4.2.1"  ,
4039    "koa-compress" : " ^3.0.0"  ,
4140    "koa-helmet" : " ^4.0.0"  ,
4241    "koa-is-json" : " ^1.0.0"  ,
42+     "koa-json-mask" : " ^1.0.0"  ,
4343    "koa-logger" : " ^3.2.0"  ,
4444    "koa-morgan" : " ^1.0.1"  ,
4545    "koa-redis-cache" : " ^3.0.2"  ,
Original file line number Diff line number Diff line change @@ -4,9 +4,9 @@ const cache = require('koa-redis-cache');
44const  compress  =  require ( 'koa-compress' ) ; 
55const  cors  =  require ( 'koa2-cors' ) ; 
66const  helmet  =  require ( 'koa-helmet' ) ; 
7- const  jsonFilter  =  require ( '@koa/json-filter' ) ; 
87const  Koa  =  require ( 'koa' ) ; 
98const  logger  =  require ( 'koa-morgan' ) ; 
9+ const  mask  =  require ( 'koa-json-mask' ) ; 
1010const  MongoClient  =  require ( 'mongodb' ) ; 
1111const  json  =  require ( './middleware/json' ) ; 
1212const  options  =  require ( './middleware/redis' ) ; 
@@ -97,7 +97,9 @@ if (process.env.NODE_ENV === 'production') {
9797} 
9898
9999// Allow user to restrict the keys returned 
100- app . use ( jsonFilter ( ) ) ; 
100+ app . use ( mask ( { 
101+   name : 'filter' , 
102+ } ) ) ; 
101103
102104// Allow pretty print via pretty=true querystring 
103105// Pretty printed json will NOT be cached 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments