File tree Expand file tree Collapse file tree 5 files changed +28
-22
lines changed
src/management/identities Expand file tree Collapse file tree 5 files changed +28
-22
lines changed Original file line number Diff line number Diff line change @@ -19,5 +19,5 @@ export class additionalFieldsPartDto {
1919 type : 'object' ,
2020 name : 'validations' ,
2121 } )
22- validations : { [ key : string ] : { [ key : string ] : string } } ;
22+ validations ? : { [ key : string ] : { [ key : string ] : string } } ;
2323}
Original file line number Diff line number Diff line change @@ -5,8 +5,9 @@ import { IdentityState } from '../_enums/states.enum';
55import { IdentityLifecycle } from '../_enums/lifecycle.enum' ;
66import { Type } from 'class-transformer' ;
77import { additionalFieldsPartDto } from './_parts/additionalFields.dto' ;
8+ import { MetadataDto } from '~/_common/abstracts/dto/metadata.dto' ;
89
9- export class IdentitiesCreateDto {
10+ export class IdentitiesCreateDto extends MetadataDto {
1011 @IsNumber ( )
1112 @IsEnum ( IdentityState )
1213 @ApiProperty ( { enum : IdentityState } )
Original file line number Diff line number Diff line change @@ -121,25 +121,28 @@ export class IdentitiesController extends AbstractController {
121121 @Res ( ) res : Response ,
122122 @SearchFilterSchema ( ) searchFilterSchema : FilterSchema ,
123123 @SearchFilterOptions ( ) searchFilterOptions : FilterOptions ,
124- ) : Promise < Response > {
125- try {
126- const [ data , total ] = await this . _service . findAndCount (
127- searchFilterSchema ,
128- IdentitiesController . projection ,
129- searchFilterOptions ,
130- ) ;
131- return res . status ( HttpStatus . OK ) . json ( {
132- statusCode : HttpStatus . OK ,
133- total,
134- data,
135- } ) ;
136- } catch ( error ) {
137- return res . status ( HttpStatus . BAD_REQUEST ) . json ( {
138- statusCode : HttpStatus . BAD_REQUEST ,
139- message : error . message ,
140- validations : error . validations ,
141- } ) ;
142- }
124+ ) : Promise <
125+ Response <
126+ {
127+ statusCode : number ;
128+ data ?: Document < Identities , any , Identities > ;
129+ total ?: number ;
130+ message ?: string ;
131+ validations ?: MixedValue ;
132+ } ,
133+ any
134+ >
135+ > {
136+ const [ data , total ] = await this . _service . findAndCount (
137+ searchFilterSchema ,
138+ IdentitiesController . projection ,
139+ searchFilterOptions ,
140+ ) ;
141+ return res . status ( HttpStatus . OK ) . json ( {
142+ statusCode : HttpStatus . OK ,
143+ total,
144+ data,
145+ } ) ;
143146 }
144147
145148 @Get ( ':_id([0-9a-fA-F]{24})' )
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ elements:
44 - type : HorizontalLayout
55 elements :
66 - type : Control
7- label : supanncivilite
7+ label : Civilité
88 scope : " #/properties/supanncivilite"
99 options :
1010 required : true
Original file line number Diff line number Diff line change @@ -87,6 +87,7 @@ export class IdentitiesJsonformsService extends AbstractService {
8787 }
8888
8989 async findAll ( ) : Promise < any > {
90+ // eslint-disable-next-line prefer-rest-params
9091 this . logger . debug ( [ 'findAll' , JSON . stringify ( Object . values ( arguments ) ) ] . join ( ' ' ) ) ;
9192 const configPath = './src/management/identities/jsonforms/_config' ;
9293 const files = readdirSync ( configPath ) ;
@@ -101,6 +102,7 @@ export class IdentitiesJsonformsService extends AbstractService {
101102 }
102103
103104 async findOne ( schema ) : Promise < any > {
105+ // eslint-disable-next-line prefer-rest-params
104106 this . logger . debug ( [ 'findOne' , JSON . stringify ( Object . values ( arguments ) ) ] . join ( ' ' ) ) ;
105107 const filePath = `./src/management/identities/jsonforms/_config/${ schema } .ui.yml` ;
106108 if ( ! existsSync ( filePath ) ) {
You can’t perform that action at this time.
0 commit comments