Closed jmprathab closed 4 years ago
Is this simply just adding a feature to record a payment for a user like in a Java class, e.g. a Bill and then the user can create this bill and apply it to the member?
You can assign me to it if you want and I'll figure it out. I have updated my fork and started working on it
@edwardUL99 You are right. This is to record payment for a user.
Example scenario:
An API endpoint should allow adding a payment for a particular house member. This payment entity should have details like - Amount
Each of these sub-tasks can be taken up in a separate issue if you feel so.
I have it set up and fixed any database errors. I have added /members/payments which schedules a new payment, /members/payments/{paymentId} which lists a payment's details, /members/{memberId}/payments which lists all the scheduled payments for a certain user and /communities/{communityId}/admins/{adminId}/payments which lists all the payments that admin scheduled. I have the 3 endpoints working but the last one gives an empty set, so I am working on getting that working. There seems to be an issue with retrieving community admin as I added a findAdminById to communit admin repository, but it throws an exception saying there is more than 1 admin per adminId.
UPDATE: I have the last endpoint working with a workaround but I am not sure how it is performance wise
@edwardUL99 Please skip /communities/{communityId}/admins/{adminId}/payments
as of now if it seems complicated to implement now for various reasons/other bugs.
I have it implemented and it only takes 25 ms to respond but I can remove it
Thanks. That should be fine. Please create a tracking bug if you feel there is a better way to handle it. We will take care of performance improvement in the future.