fix: point customers page at /admin/customers instead of legacy path
getallcustomers/getcustomersummary still called the old /customers/getallcustomers and /customers/getcustomersummary paths, which 403 on api.doormile.com (auth was accepted, route wasn't valid). Repointed both at /admin/customers per the original conversion plan. No Doormile customer response shape has been confirmed anywhere in this work (unlike bookings/clients/milers, which had example shapes given up front) -- field names in customers.js (firstname/contactno/address/ customerid/etc) are still the old NearlExpress shape and left as-is rather than guessed. Won't crash, just shows blanks for any field that doesn't exist on a real Doormile customer. Need the actual response body to do a real field-mapping pass, same as the login.js episode. updateCustomer (PUT /customers/update) is still unmapped -- flagged in a comment rather than guessed at, consistent with cancelOrder.
This commit is contained in:
@@ -352,6 +352,9 @@ export default function Customers() {
|
||||
OpenToast('Enter Longitude', 'warning', 1500);
|
||||
} else {
|
||||
try {
|
||||
// NOTE: no Doormile "update customer" endpoint has been specified —
|
||||
// this still calls the old /customers/update path and will fail
|
||||
// against api.doormile.com. Left as-is rather than guessed at.
|
||||
const postUpdateResponse = await axios.put(`${process.env.REACT_APP_URL}/customers/update`, {
|
||||
customerid: selectedCustomer.customerid,
|
||||
configid: 1,
|
||||
|
||||
Reference in New Issue
Block a user