feat: 接入真实登录与成员权限
- auth/members/messages: 新增超级管理员登录、成员权限和密码消息流程 - agent-config/agent: 支持服务端保存 Agent 配置并取消未配置 mock 成功结果 - projects/deploy-runs/settings: 按当前用户权限保护真实接口 - prisma: 新增用户、项目权限和平台消息表结构
This commit is contained in:
@@ -8,7 +8,7 @@ export class HealthController {
|
||||
constructor(private readonly healthService: HealthService) {}
|
||||
|
||||
@Get()
|
||||
@ApiOkResponse({ description: 'Runtime dependency health summary.' })
|
||||
@ApiOkResponse({ description: '查询运行时依赖健康状态。' })
|
||||
async getHealth(): Promise<ReturnType<HealthService['getHealth']>> {
|
||||
return this.healthService.getHealth();
|
||||
}
|
||||
|
||||
@@ -30,7 +30,9 @@ describe('HealthService', () => {
|
||||
healthSummary: jest.fn(() => ({ status: 'not_configured' as const })),
|
||||
} satisfies Pick<DeployNotificationService, 'healthSummary'>;
|
||||
const llm = {
|
||||
healthSummary: jest.fn(() => ({ status: 'not_configured' as const })),
|
||||
healthSummary: jest.fn(() =>
|
||||
Promise.resolve({ status: 'not_configured' as const }),
|
||||
),
|
||||
} satisfies Pick<LlmClient, 'healthSummary'>;
|
||||
const service = new HealthService(
|
||||
config as unknown as ConfigService<EnvConfig, true>,
|
||||
|
||||
@@ -33,7 +33,7 @@ export class HealthService {
|
||||
jenkins: this.jenkins.healthSummary(),
|
||||
gitea: this.gitea.healthSummary(),
|
||||
notification: this.notification.healthSummary(),
|
||||
llm: this.llm.healthSummary(),
|
||||
llm: await this.llm.healthSummary(),
|
||||
};
|
||||
const hasUnavailable = Object.values(dependencies).some(
|
||||
(dependency) => dependency.status === 'unavailable',
|
||||
|
||||
Reference in New Issue
Block a user