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