bloom-backend
bloom-backend copied to clipboard
Replace use of req["user"] with req["userEntity"] in subscription-user.controller.ts
Overview
Take a read through the umbrella ticket. As a sub task to this ticket we want to phase out the use of req["user"]
from the subscription-user.controller.ts. The endpoints that need addressing are POST /subscription-user/whatsapp, POST /subscription-user/whatsapp/:id. Note that we haven't followed rest patterns here and hopefully this will be refactored at a later date but not part of this ticket.
Action Items
- [ ] For each endpoint that uses
req["user"]
, the service methods will need to be refactored to take thereq["userEntity"]
rather thanreq["user"]
. This means the service methods will be taking userEntity rather thanGetUserDto
as its argument. The types need to be updated in the service method and adjustments will need to be made if they are used elsewhere. - [ ] Run all tests. This includes Cypress tests. You will need to load the frontend repository to get instructions about how this works. https://github.com/chaynHQ/bloom-frontend