@@ -21,14 +21,7 @@ import {
21
21
W3CCreateSchema
22
22
} from './interfaces/schema-payload.interface' ;
23
23
import { ResponseMessages } from '@credebl/common/response-messages' ;
24
- import {
25
- ICreateSchema ,
26
- ICreateW3CSchema ,
27
- IGenericSchema ,
28
- IUpdateSchema ,
29
- IUserRequestInterface ,
30
- UpdateSchemaResponse
31
- } from './interfaces/schema.interface' ;
24
+ import { ICreateSchema , ICreateW3CSchema , IGenericSchema , IUpdateSchema , IUserRequestInterface , UpdateSchemaResponse } from './interfaces/schema.interface' ;
32
25
import { CreateSchemaAgentRedirection , GetSchemaAgentRedirection , ISchemaId } from './schema.interface' ;
33
26
import { map } from 'rxjs/operators' ;
34
27
import {
@@ -123,8 +116,7 @@ export class SchemaService extends BaseService {
123
116
} ) ;
124
117
}
125
118
126
- const attributeDisplayNamesLowerCase = trimmedAttributes . map ( ( attribute ) =>
127
- attribute . displayName . toLocaleLowerCase ( )
119
+ const attributeDisplayNamesLowerCase = trimmedAttributes . map ( ( attribute ) => attribute . displayName . toLocaleLowerCase ( )
128
120
) ;
129
121
const duplicateAttributeDisplayNames = attributeDisplayNamesLowerCase . filter (
130
122
( value , index , element ) => element . indexOf ( value ) !== index
@@ -260,8 +252,8 @@ export class SchemaService extends BaseService {
260
252
} ) ;
261
253
}
262
254
} else if ( type === SchemaTypeEnum . JSON ) {
263
- const josnSchemaDetails = schemaPayload as unknown as ICreateW3CSchema ;
264
- const createW3CSchema = await this . createW3CSchema ( orgId , josnSchemaDetails , user . id , alias ) ;
255
+ const jsonSchemaDetails = schemaPayload as unknown as ICreateW3CSchema ;
256
+ const createW3CSchema = await this . createW3CSchema ( orgId , jsonSchemaDetails , user . id , alias ) ;
265
257
return createW3CSchema ;
266
258
}
267
259
} catch ( error ) {
@@ -271,12 +263,7 @@ export class SchemaService extends BaseService {
271
263
}
272
264
}
273
265
274
- async createW3CSchema (
275
- orgId : string ,
276
- schemaPayload : ICreateW3CSchema ,
277
- user : string ,
278
- alias : string
279
- ) : Promise < ISchemaData > {
266
+ async createW3CSchema ( orgId :string , schemaPayload : ICreateW3CSchema , user : string , alias : string ) : Promise < ISchemaData > {
280
267
try {
281
268
let createSchema ;
282
269
0 commit comments