@@ -26,7 +26,7 @@ export class DeviceManagerEngine extends AbstractEngine {
2626 mappings : this . assetMappings . get ( group )
2727 } ) ) ;
2828
29- promises . push ( this . sdk . collection . create ( index , 'assets -history' , {
29+ promises . push ( this . sdk . collection . create ( index , 'asset -history' , {
3030 mappings : this . getAssetsHistoryMappings ( group )
3131 } ) ) ;
3232
@@ -47,7 +47,7 @@ export class DeviceManagerEngine extends AbstractEngine {
4747
4848 await Promise . all ( promises ) ;
4949
50- return { collections : [ 'assets' , 'assets -history' , this . config . configCollection , 'devices' ] } ;
50+ return { collections : [ 'assets' , 'asset -history' , this . config . configCollection , 'devices' ] } ;
5151 }
5252
5353 async onUpdate ( index : string , group = 'commons' ) {
@@ -57,7 +57,7 @@ export class DeviceManagerEngine extends AbstractEngine {
5757 mappings : this . assetMappings . get ( group )
5858 } ) ) ;
5959
60- promises . push ( this . sdk . collection . create ( index , 'assets -history' , {
60+ promises . push ( this . sdk . collection . create ( index , 'asset -history' , {
6161 mappings : this . getAssetsHistoryMappings ( group )
6262 } ) ) ;
6363
@@ -67,23 +67,23 @@ export class DeviceManagerEngine extends AbstractEngine {
6767
6868 await Promise . all ( promises ) ;
6969
70- return { collections : [ 'assets' , 'assets -history' , 'devices' ] } ;
70+ return { collections : [ 'assets' , 'asset -history' , 'devices' ] } ;
7171 }
7272
7373 async onDelete ( index : string ) {
7474 const promises = [ ] ;
7575
7676 promises . push ( this . sdk . collection . delete ( index , 'assets' ) ) ;
77- promises . push ( this . sdk . collection . delete ( index , 'assets -history' ) ) ;
77+ promises . push ( this . sdk . collection . delete ( index , 'asset -history' ) ) ;
7878 promises . push ( this . sdk . collection . delete ( index , 'devices' ) ) ;
7979
8080 await Promise . all ( promises ) ;
8181
82- return { collections : [ 'assets' , 'assets -history' , 'devices' ] } ;
82+ return { collections : [ 'assets' , 'asset -history' , 'devices' ] } ;
8383 }
8484
8585 private getAssetsHistoryMappings ( group : string ) {
86- const mappings = JSON . parse ( JSON . stringify ( this . config . collections [ 'assets -history' ] ) ) ;
86+ const mappings = JSON . parse ( JSON . stringify ( this . config . collections [ 'asset -history' ] ) ) ;
8787
8888 mappings . properties . asset = this . assetMappings . get ( group ) ;
8989
0 commit comments