From 2aac301b29054dc48905810b79a142e4fd5b279c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=9Cmit=20Tun=C3=A7?= Date: Fri, 17 Jan 2025 23:28:37 +0300 Subject: [PATCH] Update API routes for currency and gold rates - Replaced the '/today.json' endpoint with '/run-all-fetchs' to trigger fetching jobs for currency and gold rates. - Updated the '/today.json' endpoint to now call 'getAllRates' for improved data retrieval. - Added new endpoints for '/gold-rates' and '/gold-rates/{goldName}' to enhance access to gold rate data. - Maintained existing '/currency-rates' and '/currency-rates/{currencyName}' endpoints for current currency rates. These changes improve the API's functionality and organization, facilitating better management of financial data. --- routes/api.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/routes/api.php b/routes/api.php index b6e3cd1..0308128 100644 --- a/routes/api.php +++ b/routes/api.php @@ -10,6 +10,9 @@ use App\Http\Controllers\CurrencyController; |-------------------------------------------------------------------------- */ -Route::get('/today.json', [CurrencyController::class, 'getCurrentRates']); +Route::get('/run-all-fetchs', [CurrencyController::class, 'runAllFetchs']); +Route::get('/today.json', [CurrencyController::class, 'getAllRates']); Route::get('/currency-rates', [CurrencyController::class, 'getCurrentRates']); -Route::get('/currency-rates/{currencyName}', [CurrencyController::class, 'getCurrencyRateByName']); \ No newline at end of file +Route::get('/gold-rates', [CurrencyController::class, 'getGoldRates']); +Route::get('/currency-rates/{currencyName}', [CurrencyController::class, 'getCurrencyRateByName']); +Route::get('/gold-rates/{goldName}', [CurrencyController::class, 'getGoldRateByName']); \ No newline at end of file