Explorar o código

订单物流查询去掉用户认证

bianjunhui hai 14 horas
pai
achega
492fc27be1
Modificáronse 1 ficheiros con 8 adicións e 1 borrados
  1. 8 1
      packages/Webkul/Shop/src/Routes/api-token.php

+ 8 - 1
packages/Webkul/Shop/src/Routes/api-token.php

@@ -44,13 +44,20 @@ Route::group(['prefix' => 'api'], function () {
             Route::post('claim', 'claim')->name('shop.api.token.customer.coupons.claim');
         });
 
+    /** 物流轨迹查询(Storefront Key 认证,无需登录) */
+    Route::controller(OrderController::class)
+        ->middleware('storefront.key')
+        ->prefix('customer/orders')
+        ->group(function () {
+            Route::get('tracking', 'tracking')->name('shop.api.token.customer.orders.tracking');
+        });
+
     /** 客户订单管理(Bearer Token 认证) */
     Route::controller(OrderController::class)
         ->middleware('bearer.token')
         ->prefix('customer/orders')
         ->group(function () {
             Route::get('', 'index')->name('shop.api.token.customer.orders.index');
-            Route::get('tracking', 'tracking')->name('shop.api.token.customer.orders.tracking');
             Route::get('{id}', 'show')->name('shop.api.token.customer.orders.show');
         });