Edit form costumer
This commit is contained in:
@@ -82,7 +82,11 @@ export class PeopleController {
|
||||
|
||||
@Post()
|
||||
create(@CurrentUser() user: Actor, @Body() dto: CreatePersonDto) {
|
||||
return this.peopleService.create(user, dto);
|
||||
return this.peopleService.create(user, {
|
||||
...dto,
|
||||
firstName: dto.firstName ?? '',
|
||||
lastName: dto.lastName ?? '',
|
||||
});
|
||||
}
|
||||
|
||||
@Patch(':id')
|
||||
|
||||
@@ -423,8 +423,8 @@ export interface PersonDto {
|
||||
}
|
||||
|
||||
export interface CreatePersonRequest {
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
firstName?: string;
|
||||
lastName?: string;
|
||||
email?: string;
|
||||
phone?: string;
|
||||
mobile?: string;
|
||||
|
||||
Reference in New Issue
Block a user