diff --git a/app/Http/Controllers/CurrencyController.php b/app/Http/Controllers/CurrencyController.php index 6be0c7f..97160e8 100755 --- a/app/Http/Controllers/CurrencyController.php +++ b/app/Http/Controllers/CurrencyController.php @@ -4,8 +4,8 @@ namespace App\Http\Controllers; use App\Jobs\FetchCurrencyRates; use App\Jobs\FetchGoldRates; -use App\Jobs\MergeCurrencyAndGoldRates; use App\Jobs\FetchCryptoCurrencyRates; +use App\Jobs\MergeCurrencyAndGoldRates; use Illuminate\Support\Facades\Storage; use App\Http\Controllers\Controller; @@ -28,14 +28,15 @@ class CurrencyController extends Controller public function runAllFetchs() { try { - FetchCryptoCurrencyRates::dispatchSync(); + FetchCurrencyRates::dispatchSync(); FetchGoldRates::dispatchSync(); + FetchCryptoCurrencyRates::dispatchSync(); MergeCurrencyAndGoldRates::dispatchSync(); return response()->json([ 'status' => 'success', - 'message' => 'Tüm döviz ve altın kurları başarıyla güncellendi' + 'message' => 'All currency and gold rates have been successfully updated' ]); } catch (\Exception $e) { return response()->json([ @@ -46,7 +47,7 @@ class CurrencyController extends Controller } /** - * 🪙 💵 Retrieves all gold and currency rates + * 🪙 💵 ₿ Retrieves all gold and currency rates * * @return \Illuminate\Http\JsonResponse */ @@ -76,7 +77,7 @@ class CurrencyController extends Controller } } - return response()->json(['error' => 'Veri bulunamadı'], 404); + return response()->json(['error' => 'Data not found'], 404); } /** @@ -110,7 +111,7 @@ class CurrencyController extends Controller return response()->json($data); } - return response()->json(['error' => 'Veri bulunamadı'], 404); + return response()->json(['error' => 'Data not found'], 404); } /** @@ -144,7 +145,7 @@ class CurrencyController extends Controller return response()->json($data); } - return response()->json(['error' => 'Veri bulunamadı'], 404); + return response()->json(['error' => 'Data not found'], 404); } /** @@ -177,7 +178,7 @@ class CurrencyController extends Controller return response()->json($data); } - return response()->json(['error' => 'Veri bulunamadı'], 404); + return response()->json(['error' => 'Data not found'], 404); } /** @@ -236,9 +237,9 @@ class CurrencyController extends Controller if (isset($data[$cryptoCurrencyName])) { return response()->json([$cryptoCurrencyName => $data[$cryptoCurrencyName]]); } - return response()->json(['error' => 'Kripto para birimi bulunamadı'], 404); + return response()->json(['error' => 'Cryptocurrency not found'], 404); } - return response()->json(['error' => 'Veri bulunamadı'], 404); + return response()->json(['error' => 'Data not found'], 404); } } \ No newline at end of file