Files
Ümit Tunç 2dee2f56b9 Refactor API routes for currency and gold rates
- Commented out the '/run-all-fetchs' endpoint to prevent its usage while maintaining the '/today.json' endpoint for fetching all rates.
- Rearranged the '/gold-rates' endpoint to ensure it is defined after the '/currency-rates' endpoints for better organization.
- Ensured all existing endpoints for currency and gold rates remain functional, enhancing the API's structure and maintainability.

These changes improve the clarity and organization of the API routes, facilitating better management of financial data.
2025-01-17 23:33:02 +03:00

21 lines
788 B
PHP

<?php
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\CurrencyController;
/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
*/
//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']);
Route::get('/gold-rates', [CurrencyController::class, 'getGoldRates']);
Route::get('/gold-rates/{goldName}', [CurrencyController::class, 'getGoldRateByName']);