khanegi admin changes

This commit is contained in:
2026-06-13 15:55:28 +03:30
parent 2d2e5f2e4d
commit 9b28a55634
2 changed files with 20 additions and 13 deletions
@@ -5,7 +5,6 @@ namespace App\Http\Controllers\Admin;
use App\DB\Te\TableEngine;
use App\Http\Controllers\Controller;
use App\Models\PriceSyncLog;
use App\Services\ConfigService;
use App\Services\ProductPriceSyncService;
use Illuminate\Http\Request;
@@ -30,12 +29,8 @@ class PriceSyncLogController extends Controller
return response()->json($log);
}
public function runSync(ProductPriceSyncService $syncService, ConfigService $configService)
public function runSync(ProductPriceSyncService $syncService)
{
if (! $configService->isStore()) {
return response()->json(['message' => 'فقط در حالت فروشگاه'], 422);
}
$syncService->syncStorePrices(true);
$log = PriceSyncLog::with('items')->orderByDesc('id')->first();