Fix backend business logic and remove hardcoded IDs
- Add customerId to SaleRequest DTO - Update SaleService to use AuthenticationHelper for employee attribution - Populate sale.customer when customerId provided in request - Fix AdoptionController to use authenticated customer instead of hardcoded ID 1 - Fix AppointmentController to use authenticated customer instead of hardcoded ID 1 - Fix RefundController to use authenticated customer instead of hardcoded ID 1 - Update data.sql sales to include customer linkage for refund testing - Update Postman collection sale creation with customerId and items
This commit is contained in:
@@ -509,7 +509,7 @@
|
||||
],
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"employeeId\": 1,\n \"storeId\": 1,\n \"totalAmount\": 100.0,\n \"paymentMethod\": \"Card\",\n \"isRefund\": false\n}"
|
||||
"raw": "{\n \"storeId\": 1,\n \"paymentMethod\": \"Card\",\n \"customerId\": 1,\n \"items\": [\n {\n \"prodId\": 1,\n \"quantity\": 2\n },\n {\n \"prodId\": 2,\n \"quantity\": 1\n }\n ],\n \"isRefund\": false\n}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user