feat: reponse readable text and linting some pages.

This commit is contained in:
a.bouhuolia
2021-01-02 10:44:38 +02:00
parent d30e76c5cf
commit b6392e4208
9 changed files with 164 additions and 85 deletions

View File

@@ -213,7 +213,10 @@ export default class CustomersController extends ContactsController {
try {
await this.customersService.deleteCustomer(tenantId, contactId)
return res.status(200).send({ id: contactId });
return res.status(200).send({
id: contactId,
message: 'The customer has been deleted successfully.',
});
} catch (error) {
next(error);
}
@@ -252,7 +255,11 @@ export default class CustomersController extends ContactsController {
try {
await this.customersService.deleteBulkCustomers(tenantId, contactsIds)
return res.status(200).send({ ids: contactsIds });
return res.status(200).send({
ids: contactsIds,
message: 'The customers have been deleted successfully.',
});
} catch (error) {
next(error);
}