File tree Expand file tree Collapse file tree 3 files changed +12
-12
lines changed Expand file tree Collapse file tree 3 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -13,13 +13,13 @@ function primusClient (connection, options) {
13
13
} ) ) ;
14
14
} ;
15
15
16
- const initialize = function ( ) {
17
- if ( typeof this . defaultService === 'function' ) {
16
+ const initialize = function ( app ) {
17
+ if ( typeof app . defaultService === 'function' ) {
18
18
throw new Error ( 'Only one default client provider can be configured' ) ;
19
19
}
20
20
21
- this . primus = connection ;
22
- this . defaultService = defaultService ;
21
+ app . primus = connection ;
22
+ app . defaultService = defaultService ;
23
23
} ;
24
24
25
25
initialize . Service = Service ;
Original file line number Diff line number Diff line change @@ -32,13 +32,13 @@ function restClient (base = '') {
32
32
return new Service ( { base, name, connection, options } ) ;
33
33
} ;
34
34
35
- const initialize = function ( ) {
36
- if ( typeof this . defaultService === 'function' ) {
35
+ const initialize = function ( app ) {
36
+ if ( typeof app . defaultService === 'function' ) {
37
37
throw new Error ( 'Only one default client provider can be configured' ) ;
38
38
}
39
39
40
- this . rest = connection ;
41
- this . defaultService = defaultService ;
40
+ app . rest = connection ;
41
+ app . defaultService = defaultService ;
42
42
} ;
43
43
44
44
initialize . Service = Service ;
Original file line number Diff line number Diff line change @@ -19,13 +19,13 @@ function socketioClient (connection, options) {
19
19
return new Service ( settings ) ;
20
20
} ;
21
21
22
- const initialize = function ( ) {
23
- if ( typeof this . defaultService === 'function' ) {
22
+ const initialize = function ( app ) {
23
+ if ( typeof app . defaultService === 'function' ) {
24
24
throw new Error ( 'Only one default client provider can be configured' ) ;
25
25
}
26
26
27
- this . io = connection ;
28
- this . defaultService = defaultService ;
27
+ app . io = connection ;
28
+ app . defaultService = defaultService ;
29
29
} ;
30
30
31
31
initialize . Service = Service ;
You can’t perform that action at this time.
0 commit comments