Merge branch 'v2-dev' of https://github.com/certd/certd into v2-dev

This commit is contained in:
xiaojunnuo
2026-07-07 00:12:46 +08:00
6 changed files with 7 additions and 10 deletions
@@ -207,7 +207,7 @@ export function useCertUpload() {
const { id } = await api.Save({ const { id } = await api.Save({
title: pipeline.title, title: pipeline.title,
content: JSON.stringify(pipeline), content: JSON.stringify(pipeline),
keepHistoryCount: 30, keepHistoryCount: 100,
type: "cert_upload", type: "cert_upload",
groupId: form.groupId, groupId: form.groupId,
}); });
@@ -605,7 +605,7 @@ export function useCertPipelineCreator({ formWrapperRef }: { formWrapperRef: Ref
const { id } = await api.Save({ const { id } = await api.Save({
title: pipeline.title, title: pipeline.title,
content: JSON.stringify(pipeline), content: JSON.stringify(pipeline),
keepHistoryCount: 30, keepHistoryCount: 100,
type: "cert", type: "cert",
groupId, groupId,
addToMonitorEnabled: form.addToMonitorEnabled, addToMonitorEnabled: form.addToMonitorEnabled,
@@ -160,7 +160,7 @@ export async function createPipelineByTemplate(opts: { templateId: number; title
return await templateApi.CreatePipelineByTemplate({ return await templateApi.CreatePipelineByTemplate({
title, title,
content: JSON.stringify(pipeline), content: JSON.stringify(pipeline),
keepHistoryCount: keepHistoryCount ?? 30, keepHistoryCount: keepHistoryCount ?? 100,
groupId, groupId,
templateId, templateId,
}); });
@@ -55,16 +55,13 @@ export class MineController extends BaseController {
//@ts-ignore //@ts-ignore
user.needInitPassword = needInitPassword; user.needInitPassword = needInitPassword;
const { projectId } = await this.getProjectUserIdRead();
const userProjectQuery = this.accessService.buildUserProjectQuery(userId, projectId);
const existingAccess = await this.accessService.findOne({ const existingAccess = await this.accessService.findOne({
where: { type: "acmeAccount", subtype: "letsencrypt", ...userProjectQuery }, where: { type: "acmeAccount", subtype: "letsencrypt", userId },
}); });
if (!existingAccess) { if (!existingAccess) {
//@ts-ignore //@ts-ignore
user.needInitAccount = true; user.needInitAccount = true;
} }
return this.ok(user); return this.ok(user);
} }
@@ -30,8 +30,8 @@ export class PasskeyService extends BaseService<PasskeyEntity> {
rpName = siteInfo.title || rpName; rpName = siteInfo.title || rpName;
} }
const rpId = ctx.hostname; const origin = ctx.headers.origin || ctx.origin;
const origin = ctx.origin; const rpId = origin ? new URL(origin).hostname : ctx.hostname;
return { return {
rpName, rpName,
@@ -1376,7 +1376,7 @@ export class PipelineService extends BaseService<PipelineEntity> {
bean.status = "none"; bean.status = "none";
bean.type = "cert_auto"; bean.type = "cert_auto";
bean.disabled = false; bean.disabled = false;
bean.keepHistoryCount = 30; bean.keepHistoryCount = 100;
bean.projectId = req.projectId; bean.projectId = req.projectId;
await this.save(bean); await this.save(bean);