forked from Yara724/api
Fixed smsApiKey index error and err handling in ESG
This commit is contained in:
@@ -114,6 +114,7 @@ export class ClientService {
|
||||
) {}
|
||||
async addClient(client: ClientDto): Promise<ClientDtoRs> {
|
||||
try {
|
||||
const smsApiKey = client.property?.smsApiKey?.trim();
|
||||
const newClient = await this.clientDbService.create({
|
||||
clientCode: client.clientCode,
|
||||
|
||||
@@ -129,9 +130,7 @@ export class ClientService {
|
||||
: (client.clientName?.english ?? null),
|
||||
},
|
||||
|
||||
property: {
|
||||
smsApiKey: client.property?.smsApiKey ?? null,
|
||||
},
|
||||
...(smsApiKey ? { property: { smsApiKey } } : {}),
|
||||
|
||||
useExpertMode: client.useExpertMode ?? null,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user