From ff5ad21eb991d9378d8db86c6b26c850ad903c44 Mon Sep 17 00:00:00 2001 From: Mahdi Date: Sat, 19 Sep 2026 16:23:11 +0330 Subject: [PATCH] Edit form costumer --- apps/api/src/contacts/people.controller.ts | 6 +++++- packages/shared/src/index.ts | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/apps/api/src/contacts/people.controller.ts b/apps/api/src/contacts/people.controller.ts index b8a43f8..0f0401b 100644 --- a/apps/api/src/contacts/people.controller.ts +++ b/apps/api/src/contacts/people.controller.ts @@ -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') diff --git a/packages/shared/src/index.ts b/packages/shared/src/index.ts index 0893249..99fce49 100644 --- a/packages/shared/src/index.ts +++ b/packages/shared/src/index.ts @@ -423,8 +423,8 @@ export interface PersonDto { } export interface CreatePersonRequest { - firstName: string; - lastName: string; + firstName?: string; + lastName?: string; email?: string; phone?: string; mobile?: string;