Closed TheTharz closed 6 months ago
Problem:
When creating a new cashier using the API endpoint /employers/save-without-image
, the response always returns an ID of 0 instead of the expected unique ID for the newly created cashier.
Steps to Reproduce:
/employers/save-without-image
endpoint with valid data for creating a new cashier.Expected Behavior: The response should include a unique ID for the newly created cashier, allowing us to identify and work with this cashier in subsequent operations.
Actual Behavior: The ID in the response is consistently returning as 0, which does not match the expected behavior.
The issue was fixed in PR #93.
After merging PR #93, the response for creating a new cashier now correctly includes a unique ID. Below are sample responses for verification:
Previous Response:
{
"code": 201,
"message": "successfully saved",
"data": {
"employerId": 0,
"branchId": 3,
"employerNicName": "mfwefgewgwegwegama",
"employerFirstName": "John",
"employerLastName": "Doe",
"employerPassword": "secretpassword",
"employerEmail": "john@,mm,,mdnfkjfnewefewfwefwewjkfwke.com",
"employerPhone": "+1234567890",
"employerAddress": "123 Main Street",
"employerSalary": 50000.0,
"employerNic": "ABCD1234",
"gender": "MALE",
"dateOfBirth": "1990-01-01T00:00:00.000+00:00",
"role": "OWNER",
"pin": 1234,
"activeStatus": true
}
}
Updated Response:
{
"code": 201,
"message": "successfully saved",
"data": {
"employerId": 1,
"branchId": 3,
"employerNicName": "mfwefgewgwegwegama",
"employerFirstName": "John",
"employerLastName": "Doe",
"employerPassword": "secretpassword",
"employerEmail": "john@,mm,,mdnfkjfnewefewfwefwewjkfwke.com",
"employerPhone": "+1234567890",
"employerAddress": "123 Main Street",
"employerSalary": 50000.0,
"employerNic": "ABCD1234",
"gender": "MALE",
"dateOfBirth": "1990-01-01T00:00:00.000+00:00",
"role": "OWNER",
"pin": 1234,
"activeStatus": true
}
}
The issue has been successfully resolved with the merge of PR #93. The response now correctly includes the unique ID for the newly created cashier.
Comment for Closing the Issue:
The issue with creating a new cashier and receiving an ID of 0 in the response has been resolved. The fix has been implemented and merged in PR #93. The response now correctly includes a unique ID for the newly created cashier. This issue can be closed.
Thanks to everyone involved for their contributions!
Please use the above comment to close the issue on your repository.
Best regards, Pramitha Jayasooriya Backend Developer at LifePill https://pramithamj@gmail.com
Issue Description
Problem
When creating a new cashier using the API endpoint
/employers/save-without-image
, the response always returns an ID of 0 instead of the expected unique ID for the newly created cashier.Steps to Reproduce
/employers/save-without-image
endpoint with valid data for creating a new cashier.Expected Behavior
The response should include a unique ID for the newly created cashier, allowing us to identify and work with this cashier in subsequent operations.
Actual Behavior
The ID in the response is consistently returning as 0, which does not match the expected behavior.
For a different cashier creation