mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-22 16:43:35 +00:00
fix: 统一管理员密码管理机制,以init.json为唯一数据源
- app.js: 每次启动强制从init.json加载管理员凭据到Redis,确保数据一致性 - web.js: 修改密码时先更新init.json,成功后再更新Redis缓存 - cli/index.js: CLI创建管理员时同时更新init.json和Redis - setup.js: 优化提示信息,明确重置密码需要重启服务 - admin.js: 修复Claude账户专属绑定功能的验证逻辑 解决了之前存在的双重存储同步问题,现在init.json是唯一真实数据源。 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -246,8 +246,11 @@ const app = createApp({
|
||||
// 初始化日期筛选器和图表数据
|
||||
this.initializeDateFilter();
|
||||
|
||||
// 根据当前活跃标签页加载数据
|
||||
this.loadCurrentTabData();
|
||||
// 预加载账号列表,以便在API Keys页面能正确显示绑定账号名称
|
||||
this.loadAccounts().then(() => {
|
||||
// 根据当前活跃标签页加载数据
|
||||
this.loadCurrentTabData();
|
||||
});
|
||||
// 如果在仪表盘,等待Chart.js加载后初始化图表
|
||||
if (this.activeTab === 'dashboard') {
|
||||
this.waitForChartJS().then(() => {
|
||||
@@ -755,7 +758,11 @@ const app = createApp({
|
||||
});
|
||||
break;
|
||||
case 'apiKeys':
|
||||
this.loadApiKeys();
|
||||
// 加载API Keys时同时加载账号列表,以便显示绑定账号名称
|
||||
Promise.all([
|
||||
this.loadApiKeys(),
|
||||
this.loadAccounts()
|
||||
]);
|
||||
break;
|
||||
case 'accounts':
|
||||
this.loadAccounts();
|
||||
|
||||
Reference in New Issue
Block a user