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.
This commit is contained in:
+5
-2
@@ -10,9 +10,12 @@ use App\Http\Controllers\CurrencyController;
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
Route::get('/run-all-fetchs', [CurrencyController::class, 'runAllFetchs']);
|
||||
//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', [CurrencyController::class, 'getGoldRates']);
|
||||
Route::get('/gold-rates/{goldName}', [CurrencyController::class, 'getGoldRateByName']);
|
||||
Reference in New Issue
Block a user