mirror of
https://github.com/certd/certd.git
synced 2026-07-15 10:17:33 +08:00
feat: 支持审计日志,操作日志
This commit is contained in:
@@ -2,6 +2,7 @@ import { BaseController, Constants } from "@certd/lib-server";
|
||||
import { Controller, Inject, Post, Provide } from "@midwayjs/core";
|
||||
import { TransferService } from "../../../modules/sys/enterprise/service/transfer-service.js";
|
||||
import { ApiTags } from "@midwayjs/swagger";
|
||||
import { AuditType } from "../../../modules/sys/enterprise/service/audit-constants.js";
|
||||
|
||||
/**
|
||||
*/
|
||||
@@ -16,6 +17,10 @@ export class TransferController extends BaseController {
|
||||
return this.service;
|
||||
}
|
||||
|
||||
getAuditType(): string {
|
||||
return AuditType.enterprise;
|
||||
}
|
||||
|
||||
/**
|
||||
* 我自己的资源
|
||||
* @param body
|
||||
@@ -38,6 +43,7 @@ export class TransferController extends BaseController {
|
||||
const { projectId } = await this.getProjectUserIdRead();
|
||||
const userId = this.getUserId();
|
||||
await this.service.transferAll(userId, projectId);
|
||||
this.auditLog({ content: "迁移了项目资源" });
|
||||
return this.ok();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user