mirror of
https://github.com/certd/certd.git
synced 2026-06-28 22:47:35 +08:00
refactor: 统一userProject查询参数传递逻辑
This commit is contained in:
@@ -84,10 +84,7 @@ export class DomainController extends CrudController<DomainService> {
|
||||
@Post("/deleteByIds", { description: Constants.per.authOnly, summary: "批量删除域名" })
|
||||
async deleteByIds(@Body(ALL) body: any) {
|
||||
const { projectId, userId } = await this.getProjectUserIdRead();
|
||||
await this.service.delete(body.ids, {
|
||||
userId: userId,
|
||||
projectId: projectId,
|
||||
});
|
||||
await this.service.batchDelete(body.ids, userId, projectId);
|
||||
return this.ok();
|
||||
}
|
||||
|
||||
|
||||
@@ -82,10 +82,7 @@ export class CnameRecordController extends CrudController<CnameRecordService> {
|
||||
@Post("/deleteByIds", { description: Constants.per.authOnly, summary: "批量删除CNAME记录" })
|
||||
async deleteByIds(@Body(ALL) body: any) {
|
||||
const { userId, projectId } = await this.getProjectUserIdWrite();
|
||||
await this.service.delete(body.ids, {
|
||||
userId,
|
||||
projectId,
|
||||
});
|
||||
await this.service.batchDelete(body.ids, userId, projectId);
|
||||
return this.ok();
|
||||
}
|
||||
@Post("/getByDomain", { description: Constants.per.authOnly, summary: "根据域名获取CNAME记录" })
|
||||
|
||||
Reference in New Issue
Block a user