File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
libs/json-api-nestjs/src/lib/mixin/module Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ import {
18
18
getProviderName ,
19
19
camelToKebab ,
20
20
} from '../../helper' ;
21
- import { JsonBaseController } from '../controller' ;
22
21
import { typeormMixin , transformMixin } from '../' ;
23
22
import {
24
23
JSON_API_DECORATOR_OPTIONS ,
@@ -52,13 +51,11 @@ BaseModuleClass.forRoot = function (options): DynamicModule {
52
51
controllerClass
53
52
) ;
54
53
55
- const resourceName = decoratorOptions ?. overrideName
56
- ? decoratorOptions . overrideName
57
- : `${ camelToKebab ( entityName ) } ` ;
58
-
59
54
const transformService = transformMixin ( entity , connectionName ) ;
60
55
const serviceClass = typeormMixin ( entity , connectionName , transformService ) ;
61
- Controller ( resourceName ) ( controllerClass ) ;
56
+ Controller ( decoratorOptions [ 'overrideName' ] || `${ camelToKebab ( entityName ) } ` ) (
57
+ controllerClass
58
+ ) ;
62
59
UseInterceptors ( ErrorInterceptors ) ( controllerClass ) ;
63
60
Inject ( serviceClass ) ( controllerClass . prototype , 'serviceMixin' ) ;
64
61
const properties = Reflect . getMetadata (
You can’t perform that action at this time.
0 commit comments