fix: 修复偶尔下载证书报未授权的错误

This commit is contained in:
xiaojunnuo
2026-02-27 00:37:24 +08:00
parent b2c421600c
commit 316537eb4d
10 changed files with 48 additions and 14 deletions
@@ -199,6 +199,12 @@ export class LoginService {
return this.generateToken(info);
}
writeTokenCookie(ctx:any,token: { expire: any; token: any }) {
ctx.cookies.set("certd_token", token.token, {
maxAge: 1000 * token.expire
});
}
/**
* 生成token
@@ -842,7 +842,8 @@ export class PipelineService extends BaseService<PipelineEntity> {
.addSelect("count(1)", "count")
.where({
userId: param.userId,
projectId: param.projectId
projectId: param.projectId,
isTemplate: false
})
.groupBy("status")
.getRawMany();
@@ -856,7 +857,8 @@ export class PipelineService extends BaseService<PipelineEntity> {
.addSelect("count(1)", "count")
.where({
userId: param.userId,
projectId: param.projectId
projectId: param.projectId,
isTemplate: false
})
.groupBy("disabled")
.getRawMany();
@@ -880,7 +882,8 @@ export class PipelineService extends BaseService<PipelineEntity> {
where: {
userId,
disabled: false,
projectId
projectId,
isTemplate: false
}
});
await this.fillLastVars(list);
@@ -902,7 +905,8 @@ export class PipelineService extends BaseService<PipelineEntity> {
.addSelect("COUNT(1) AS count")
.where({
// 0点
createTime: MoreThan(todayEnd.add(-param.days, "day").toDate())
createTime: MoreThan(todayEnd.add(-param.days, "day").toDate()),
isTemplate: false
})
.groupBy("date")
.getRawMany();