feat: API-Keys-Verwaltung in DB statt appsettings
- Neue Tabelle api_keys (Provider, Name, ApiKey, IsActive) - Admin-CRUD: GET/POST/PUT/DELETE /api/admin/api-keys - Aktivieren/Deaktivieren pro Provider (nur einer aktiv) - Live-Token-Update im AnthropicService ohne Neustart - Migration: AnthropicToken aus appsettings.Production.json → DB - AnthropicToken aus ServerSettings-Definitionen + appsettings entfernt - Frontend: API-Keys-Seite mit Erstellen/Bearbeiten/Löschen/Toggle - Dashboard: API-Keys-Link für Admins
This commit is contained in:
1 parent
1228dc9d58
commit
fa8deb15b6
11 files changed
+649
-4
No files matched your search
@@ -0,0 +1,13 @@
|
||||
namespace Gott.Models;
|
||||
|
||||
public class ApiKeyRecord
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string KeyId { get; set; }
|
||||
public string Provider { get; set; } // anthropic, gemini, openai, ...
|
||||
public string Name { get; set; } // Anzeigename z.B. "Tausi Pro Key"
|
||||
public string ApiKey { get; set; } // Der eigentliche Key
|
||||
public bool IsActive { get; set; } // Nur einer pro Provider aktiv
|
||||
public string CreatedAt { get; set; }
|
||||
public string UpdatedAt { get; set; }
|
||||
}
|
||||
Reference in new issue
Block a user