30dd0c5b8d
- Implemented a custom throttle middleware to limit requests to 2 per 30 seconds, enhancing API stability. - Updated API responses to include Turkish messages for successful updates and error handling. - Refactored the CurrencyController to integrate the new throttling logic and improve response clarity. - Enhanced the Scribe documentation to reflect changes in API behavior and response formats. - Updated views to improve branding and user experience, including dynamic content adjustments. These changes collectively improve the API's performance, usability, and branding for the Truncgil Finance application.
27 lines
982 B
PHP
27 lines
982 B
PHP
<?php
|
|
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Support\Facades\Route;
|
|
use App\Http\Controllers\CurrencyController;
|
|
use App\Http\Controllers\TimeDateController;
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| 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']);
|
|
|
|
|
|
Route::get('/server-time', [TimeDateController::class, 'getServerTime']);
|
|
Route::get('/server-date', [TimeDateController::class, 'getServerDate']);
|
|
|