Closed PramithaMJ closed 5 months ago
Failed conditions
0.0% Coverage on New Code (required ≥ 80%)
D Reliability Rating on New Code (required ≥ A)
See analysis details on SonarCloud
Catch issues before they fail your Quality Gate with our IDE extension SonarLint
Pull Request Title:
Fix branchId always returning zero in endpoint /lifepill/v1/employers/get-by-id
Issue
110 branchId always returns zero in endpoint /lifepill/v1/employers/get-by-id
Description: This PR addresses the issue where the
branchId
field was consistently returning zero when accessing the endpoint/lifepill/v1/employers/get-by-id
. The root cause of the issue was identified and a fix has been implemented to ensure that thebranchId
field now correctly returns the assigned branch ID for the employer.Changes Made:
Employer
entity to ensure that thebranchId
field is correctly mapped and serialized.EmployerService
to correctly fetch and assign thebranchId
during data retrieval.EmployerController
to validate thebranchId
before returning the response.How to Test:
/lifepill/v1/employers/get-by-id
endpoint with an employer ID.branchId
field in the response now correctly returns the assigned branch ID for the employer.This fix should resolve the issue and ensure the accuracy of employer data retrieval.
Best regards,
Pramitha Jayasooriya, Backend Developer at LifePill, https://pramithamj.me