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.
This commit is contained in:
Ümit Tunç
2025-01-17 23:28:37 +03:00
parent a26622c550
commit 2aac301b29
+4 -1
View File
@@ -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('/gold-rates', [CurrencyController::class, 'getGoldRates']);
Route::get('/currency-rates/{currencyName}', [CurrencyController::class, 'getCurrencyRateByName']);
Route::get('/gold-rates/{goldName}', [CurrencyController::class, 'getGoldRateByName']);