remove console log
This commit is contained in:
parent
5bd5e096ca
commit
bcd12b5317
@ -235,10 +235,10 @@ export default class CustomersController extends ApiController {
|
||||
return;
|
||||
}
|
||||
|
||||
const documentEntities : Documents[] = [];
|
||||
const documentEntities: Documents[] = [];
|
||||
//For each document uid, use DocumentsService.getByUid to get the document entity and add it to the documents array
|
||||
for (const documentUid of documentsUid) {
|
||||
const documentEntity = await this.documentsService.getByUid(documentUid, { document_type : true, folder : true });
|
||||
const documentEntity = await this.documentsService.getByUid(documentUid, { document_type: true, folder: true });
|
||||
|
||||
if (!documentEntity) {
|
||||
this.httpBadRequest(response, "Document not found");
|
||||
@ -247,8 +247,7 @@ export default class CustomersController extends ApiController {
|
||||
documentEntities.push(documentEntity);
|
||||
}
|
||||
|
||||
const customerEntity = await this.customersService.getByUid(uid, { contact: true, office : true });
|
||||
|
||||
const customerEntity = await this.customersService.getByUid(uid, { contact: true, office: true });
|
||||
|
||||
if (!customerEntity) {
|
||||
this.httpNotFoundRequest(response, "customer not found");
|
||||
@ -258,11 +257,8 @@ export default class CustomersController extends ApiController {
|
||||
//Hydrate ressource with prisma entity
|
||||
const customer = Customer.hydrate<Customer>(customerEntity, { strategy: "excludeAll" });
|
||||
|
||||
|
||||
// Call service to send reminder with documents
|
||||
const reminder = await this.customersService.sendDocumentsReminder(customer, documentEntities);
|
||||
|
||||
|
||||
await this.customersService.sendDocumentsReminder(customer, documentEntities);
|
||||
|
||||
// Success
|
||||
this.httpSuccess(response, customer);
|
||||
|
Loading…
x
Reference in New Issue
Block a user