refactor: Entferne redundanten /api/user Endpoint
Der /api/user Endpoint war redundant, da /api/account alle User-Informationen strukturiert und umfassend liefert: Entfernt: - GET /api/user (gab nur rohes GatewayUser-Model zurück) Grund: - /api/account liefert strukturierte User-Informationen - /api/account zeigt API-Keys mit Previews - /api/account enthält Budget-Übersicht - /api/account liefert Statistiken - /api/account zeigt Rate-Limits Resultat: - Saubere API-Struktur ohne Legacy-Code - 21 API-Endpoints (23 Routes inkl. Scramble-Docs) - Klare Trennung der Verantwortlichkeiten Dokumentation aktualisiert: - API_IMPLEMENTATION_STATUS.txt - API_IMPLEMENTATION_SUMMARY.md
This commit is contained in:
@@ -134,9 +134,9 @@ INSGESAMT IMPLEMENTIERT:
|
|||||||
📍 Pricing Endpoints: 3
|
📍 Pricing Endpoints: 3
|
||||||
📍 Usage Endpoints: 4
|
📍 Usage Endpoints: 4
|
||||||
📍 Account Endpoints: 2
|
📍 Account Endpoints: 2
|
||||||
📍 Chat Completion: 1 (bereits vorhanden)
|
📍 Chat Completion: 1
|
||||||
|
|
||||||
TOTAL: 21 API Endpoints
|
TOTAL: 21 API Endpoints (sauber, ohne Legacy-Code)
|
||||||
|
|
||||||
ALLE CONTROLLER ERSTELLT:
|
ALLE CONTROLLER ERSTELLT:
|
||||||
--------------------------
|
--------------------------
|
||||||
|
|||||||
@@ -45,6 +45,8 @@ Alle 4 Phasen des API-Konzepts wurden vollständig implementiert.
|
|||||||
| Account | 2 | ✅ |
|
| Account | 2 | ✅ |
|
||||||
| Chat | 1 | ✅ |
|
| Chat | 1 | ✅ |
|
||||||
|
|
||||||
|
**Hinweis:** Der redundante `/api/user` Endpoint wurde entfernt, da `/api/account` alle Informationen strukturiert liefert.
|
||||||
|
|
||||||
### Controller: 8
|
### Controller: 8
|
||||||
|
|
||||||
1. ✅ ProviderController
|
1. ✅ ProviderController
|
||||||
|
|||||||
@@ -62,9 +62,4 @@ Route::middleware('auth:api')->group(function () {
|
|||||||
// Chat Completion Endpoint - for gateway_users with API-Key authentication
|
// Chat Completion Endpoint - for gateway_users with API-Key authentication
|
||||||
Route::post('/chat/completions', [ChatCompletionController::class, 'create'])
|
Route::post('/chat/completions', [ChatCompletionController::class, 'create'])
|
||||||
->middleware(['checkbudget', 'checkratelimit']);
|
->middleware(['checkbudget', 'checkratelimit']);
|
||||||
|
|
||||||
// User info endpoint - returns GatewayUser
|
|
||||||
Route::get('/user', function (Request $request) {
|
|
||||||
return $request->user();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user