PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / 1.6.6
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler v1.6.6
1.6.6 1.6.5 1.6.4 1.6.3 1.6.2 1.6.1 1.6.0 1.5.4 1.5.5 1.5.3 1.5.2 1.5.1 1.5.0 1.4.2 1.4.1 1.4.0 1.3.28 1.3.27 1.3.26 1.3.25 1.3.23 1.3.22 1.3.21 1.3.20 1.3.19 All 49 releases
← All changes | app/Http/Routes/frontend_routes.php +11 -8 1.3.21 → 1.6.6 View file →
@@ -46,18 +46,18 @@
46 46 $router->post('login', [UserController::class, 'login']);
47 47 });
48 48
49 49 $router->prefix('customers')
50 - ->withPolicy('CustomerFrontendPolicy')->group(function (Router $router) {
51 - //$router->post('/', [CustomerController::class, 'store']);
52 - $router->get('/{customerId}', [CustomerController::class, 'getDetails']);
53 - $router->put('/{customerId}', [CustomerController::class, 'updateDetails']);
54 - $router->get('/{customerId}/orders', [CustomerController::class, 'getCustomerOrders']);
50 + ->withPolicy('PublicPolicy')->group(function (Router $router) {
51 + // Customer self-service (details/orders/address CRUD) lives under the
52 + // customer-profile group — the duplicates that used to sit here shadowed
53 + // the admin customers group and were unreachable dead code (audit #5).
54 + // Only these checkout-context routes, with no admin counterpart, remain.
55 + // PublicPolicy rather than a login gate (audit #6): guests reach these
56 + // from checkout, and both controllers fully self-guard (current-customer
57 + // resolution + ownership), answering guests with their own envelopes.
55 58 $router->get('/{customerAddressId}/update-address-select', [CustomerController::class, 'updateAddressSelect']);
56 - $router->put('/{customerId}/address', [CustomerController::class, 'updateAddress']);
57 59 $router->post('/add-address', [CustomerController::class, 'createAddress']);
58 - $router->delete('/{customerId}/address', [CustomerController::class, 'removeAddress']);
59 - $router->post('/{customerId}/address/make-primary', [CustomerController::class, 'setAddressPrimary']);
60 60 });
61 61
62 62 $router->prefix('customer-profile')->withPolicy('CustomerFrontendPolicy')->group(function (Router $router) {
63 63 $router->get('/', [CustomerProfileController::class, 'index']);
@@ -63,8 +63,9 @@
63 63 $router->get('/', [CustomerProfileController::class, 'index']);
64 64 $router->get('/downloads', [CustomerProfileController::class, 'getDownloads']);
65 65
66 66 $router->get('/profile', [CustomerProfileController::class, 'getCustomerProfileDetails']);
67 + $router->get('/sections', [CustomerProfileController::class, 'getSections']);
67 68 $router->post('/create-address', [CustomerProfileController::class, 'createCustomerProfileAddress']);
68 69
69 70 $router->post('/edit-address', [CustomerProfileController::class, 'updateCustomerProfileAddress']);
70 71 $router->post('/make-primary-address', [CustomerProfileController::class, 'makePrimaryCustomerProfileAddress']);
@@ -92,6 +93,8 @@
92 93 $router->post('subscriptions/{subscription_uuid}/switch-payment-method', [CustomerSubscriptionController::class, 'switchPaymentMethod'])->alphaNumDash('subscription_uuid');
93 94 $router->post('subscriptions/{subscription_uuid}/confirm-subscription-switch', [CustomerSubscriptionController::class, 'confirmSubscriptionSwitch'])->alphaNumDash('subscription_uuid');
94 95 $router->post('subscriptions/{subscription_uuid}/cancel-auto-renew', [CustomerSubscriptionController::class, 'cancelAutoRenew'])->alphaNumDash('subscription_uuid');
95 96 $router->post('subscriptions/{subscription_uuid}/initiate-early-payment', [CustomerSubscriptionController::class, 'initiateEarlyPayment'])->alphaNumDash('subscription_uuid');
97 + $router->post('subscriptions/{subscription_uuid}/pause', [CustomerSubscriptionController::class, 'pauseSubscription'])->alphaNumDash('subscription_uuid');
98 + $router->post('subscriptions/{subscription_uuid}/resume', [CustomerSubscriptionController::class, 'resumeSubscription'])->alphaNumDash('subscription_uuid');
96 99
97 100 });