-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/BILL-CPC-1046) Allows a User to get all their bills (db bug fix included) #629
Feat/BILL-CPC-1046) Allows a User to get all their bills (db bug fix included) #629
Conversation
…make the v2 controller.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use the @SecuredEndpoint annotation for your endpoint in the v2 controller? I think you should write tests to cover the implementation of your endpoint. Also in BillsListTable.tsx, you're using the endpoint of the old API gateway as opposed to the new one you created. You are also using fetch instead of the axiosInstance in the shared folder.
The rest looks good to me!
The tests for the endpoint where already written, they still pass with the new changes. I didn't use secured annotation because the original billing endpoint in controller didn't use it so I thought it would be ok. I have to use fetch because the axiosinstance was being super weird in processing the flux. I had to try a bunch of different ways to get it to work. |
Since you created a new v2 endpoint, I think it would be good to test your new implementation. Also I noticed that the URL contains the customer id. Wouldn't it be better to make the route be '/customer/bills'? Since you are using the logged in customer's id to perform the request you don't really need to show it in the URL. Each customer will see their corresponding bills when accessing the page. |
Ok thanks. I will makes these changes. Do I close the pull request? |
JIRA: https://champlainsaintlambert.atlassian.net/browse/CPC-1046?atlOrigin=eyJpIjoiYmE3MTgzYzlhZWQ4NGQ4YmI4ZTRhMWYwYjgwYTg2YjgiLCJwIjoiaiJ9
Context:
This ticket creates the main billing page for the customer and allows them to see all their bills (by customer id). This way the billing in the nav bar now redirects them to their billing page and the customer can see all their bills. Please note, I have accidently fixed and properly configured the database in this branch. Therefore a new branch will not be created despite the separate story.
Changes
Added to the UI (No changes to original UI)