chore: project fix

This commit is contained in:
xiaojunnuo
2026-03-04 23:53:19 +08:00
parent 17dd77cc96
commit 5ee3874b7e
14 changed files with 48 additions and 48 deletions
@@ -2,13 +2,15 @@ import { CnameRecord, ICnameProxyService } from '@certd/pipeline';
export class CnameProxyService implements ICnameProxyService {
userId: number;
getter: <T>(domain: string, userId?: number) => Promise<T>;
constructor(userId: number, getter: (domain: string, userId: number) => Promise<any>) {
projectId: number;
getter: <T>(domain: string, userId?: number, projectId?: number) => Promise<T>;
constructor(userId: number, projectId: number, getter: (domain: string, userId: number, projectId: number) => Promise<any>) {
this.userId = userId;
this.projectId = projectId;
this.getter = getter;
}
async getByDomain(domain: string): Promise<CnameRecord> {
return await this.getter<CnameRecord>(domain, this.userId);
return await this.getter<CnameRecord>(domain, this.userId, this.projectId);
}
}
@@ -59,7 +59,7 @@ export class TaskServiceGetter implements IServiceGetter{
async getCnameProxyService(): Promise<CnameProxyService> {
const cnameRecordService:CnameRecordService = await this.appCtx.getAsync("cnameRecordService")
return new CnameProxyService(this.userId, cnameRecordService.getWithAccessByDomain.bind(cnameRecordService));
return new CnameProxyService(this.userId, this.projectId, cnameRecordService.getWithAccessByDomain.bind(cnameRecordService));
}
async getNotificationService(): Promise<NotificationGetter> {