2aac301b29
- 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.
18 lines
783 B
PHP
18 lines
783 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('/gold-rates', [CurrencyController::class, 'getGoldRates']);
|
|
Route::get('/currency-rates/{currencyName}', [CurrencyController::class, 'getCurrencyRateByName']);
|
|
Route::get('/gold-rates/{goldName}', [CurrencyController::class, 'getGoldRateByName']);
|