File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ const config = require('../config/server');
1717const logger = require ( './shared/logger' ) ( ) ;
1818const storage = require ( './shared/storage' ) ( config . storage ) ;
1919serviceProvider . set ( 'storage' , storage ) ;
20- const storageProxy = require ( './shared/storage/proxy' ) ( config . storage . proxy ) ;
20+ const storageProxy = require ( './shared/storage/proxy' ) ( config . storage . proxy , storage ) ;
2121serviceProvider . set ( 'storageProxy' , storageProxy ) ;
2222const router = require ( './router' ) ;
2323/* eslint-enable */
Original file line number Diff line number Diff line change 33const autobind = require ( 'auto-bind' ) ;
44const flatMap = require ( 'lodash/flatMap' ) ;
55const path = require ( 'path' ) ;
6- const serviceProvider = require ( '../../serviceProvider' ) ;
76const uniq = require ( 'lodash/uniq' ) ;
87
98class Proxy {
10- constructor ( config ) {
11- this . storage = serviceProvider . get ( ' storage' ) ;
9+ constructor ( config , storage ) {
10+ this . storage = storage ;
1211 this . provider = Proxy . createProvider ( config ) ;
1312 this . accessManagers = [ this . provider . accessManager ] ;
1413 autobind ( this ) ;
@@ -56,7 +55,7 @@ class Proxy {
5655 }
5756}
5857
59- module . exports = config => new Proxy ( config ) ;
58+ module . exports = ( config , storage ) => new Proxy ( config , storage ) ;
6059
6160function loadProvider ( name ) {
6261 try {
You can’t perform that action at this time.
0 commit comments