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');
17
17
const logger = require ( './shared/logger' ) ( ) ;
18
18
const storage = require ( './shared/storage' ) ( config . storage ) ;
19
19
serviceProvider . set ( 'storage' , storage ) ;
20
- const storageProxy = require ( './shared/storage/proxy' ) ( config . storage . proxy ) ;
20
+ const storageProxy = require ( './shared/storage/proxy' ) ( config . storage . proxy , storage ) ;
21
21
serviceProvider . set ( 'storageProxy' , storageProxy ) ;
22
22
const router = require ( './router' ) ;
23
23
/* eslint-enable */
Original file line number Diff line number Diff line change 3
3
const autobind = require ( 'auto-bind' ) ;
4
4
const flatMap = require ( 'lodash/flatMap' ) ;
5
5
const path = require ( 'path' ) ;
6
- const serviceProvider = require ( '../../serviceProvider' ) ;
7
6
const uniq = require ( 'lodash/uniq' ) ;
8
7
9
8
class Proxy {
10
- constructor ( config ) {
11
- this . storage = serviceProvider . get ( ' storage' ) ;
9
+ constructor ( config , storage ) {
10
+ this . storage = storage ;
12
11
this . provider = Proxy . createProvider ( config ) ;
13
12
this . accessManagers = [ this . provider . accessManager ] ;
14
13
autobind ( this ) ;
@@ -56,7 +55,7 @@ class Proxy {
56
55
}
57
56
}
58
57
59
- module . exports = config => new Proxy ( config ) ;
58
+ module . exports = ( config , storage ) => new Proxy ( config , storage ) ;
60
59
61
60
function loadProvider ( name ) {
62
61
try {
You can’t perform that action at this time.
0 commit comments