diff --git a/app/Http/Controllers/CurrencyController.php b/app/Http/Controllers/CurrencyController.php index 05bb80c..b34bd83 100644 --- a/app/Http/Controllers/CurrencyController.php +++ b/app/Http/Controllers/CurrencyController.php @@ -3,6 +3,8 @@ namespace App\Http\Controllers; use App\Jobs\FetchCurrencyRates; +use App\Jobs\FetchGoldRates; +use App\Jobs\MergeCurrencyAndGoldRates; use Illuminate\Support\Facades\Storage; class CurrencyController extends Controller @@ -10,12 +12,15 @@ class CurrencyController extends Controller public function getCurrentRates() { // Job'ı çalıştır - // $data = FetchCurrencyRates::dispatchSync(); - + /* + FetchCurrencyRates::dispatchSync(); + FetchGoldRates::dispatchSync(); + MergeCurrencyAndGoldRates::dispatchSync(); + */ // JSON dosyasından oku - if (Storage::exists('currency/today.json')) { + if (Storage::exists('merged/rates.json')) { return response()->json( - json_decode(Storage::get('currency/today.json'), true) + json_decode(Storage::get('merged/rates.json'), true) ); }