File tree 1 file changed +12
-8
lines changed
1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -87,15 +87,17 @@ export class Oauth2CoreModule implements OnModuleInit {
87
87
} ,
88
88
inject : [ OAUTH2_SERVER_OPTIONS ] ,
89
89
} ;
90
+
91
+ const typeOrmEntities = options . entities || [
92
+ ClientEntity ,
93
+ AccessTokenEntity ,
94
+ ] ;
90
95
91
96
return {
92
97
module : Oauth2CoreModule ,
93
98
imports : [
94
99
CqrsModule ,
95
- TypeOrmModule . forFeature ( [
96
- ClientEntity ,
97
- AccessTokenEntity ,
98
- ] ) ,
100
+ TypeOrmModule . forFeature ( typeOrmEntities ) ,
99
101
] ,
100
102
controllers : [
101
103
Oauth2Controller
@@ -142,15 +144,17 @@ export class Oauth2CoreModule implements OnModuleInit {
142
144
inject : [ OAUTH2_SERVER_OPTIONS ] ,
143
145
} ;
144
146
147
+ const typeOrmEntities = options . entities || [
148
+ ClientEntity ,
149
+ AccessTokenEntity ,
150
+ ] ;
151
+
145
152
return {
146
153
module : Oauth2CoreModule ,
147
154
imports : [
148
155
...( options . imports || [ ] ) ,
149
156
CqrsModule ,
150
- TypeOrmModule . forFeature ( [
151
- ClientEntity ,
152
- AccessTokenEntity ,
153
- ] ) ,
157
+ TypeOrmModule . forFeature ( typeOrmEntities ) ,
154
158
] ,
155
159
providers : [
156
160
...providers ,
You can’t perform that action at this time.
0 commit comments