mirror of
https://github.com/certd/certd.git
synced 2026-07-07 21:17:42 +08:00
chore: 修改权限判断字段从summary改成description
This commit is contained in:
@@ -19,18 +19,18 @@ export class SysProjectController extends CrudController<ProjectEntity> {
|
||||
return this.service;
|
||||
}
|
||||
|
||||
@Post("/page", { summary: "sys:settings:view" })
|
||||
@Post("/page", { description: "sys:settings:view" })
|
||||
async page(@Body(ALL) body: any) {
|
||||
body.query = body.query ?? {};
|
||||
return await super.page(body);
|
||||
}
|
||||
|
||||
@Post("/list", { summary: "sys:settings:view" })
|
||||
@Post("/list", { description: "sys:settings:view" })
|
||||
async list(@Body(ALL) body: any) {
|
||||
return super.list(body);
|
||||
}
|
||||
|
||||
@Post("/add", { summary: "sys:settings:edit" })
|
||||
@Post("/add", { description: "sys:settings:edit" })
|
||||
async add(@Body(ALL) bean: any) {
|
||||
const def: any = {
|
||||
isDefault: false,
|
||||
@@ -45,28 +45,28 @@ export class SysProjectController extends CrudController<ProjectEntity> {
|
||||
});
|
||||
}
|
||||
|
||||
@Post("/update", { summary: "sys:settings:edit" })
|
||||
@Post("/update", { description: "sys:settings:edit" })
|
||||
async update(@Body(ALL) bean: any) {
|
||||
bean.userId = this.getUserId();
|
||||
return super.update(bean);
|
||||
}
|
||||
|
||||
@Post("/info", { summary: "sys:settings:view" })
|
||||
@Post("/info", { description: "sys:settings:view" })
|
||||
async info(@Query("id") id: number) {
|
||||
return super.info(id);
|
||||
}
|
||||
|
||||
@Post("/delete", { summary: "sys:settings:edit" })
|
||||
@Post("/delete", { description: "sys:settings:edit" })
|
||||
async delete(@Query("id") id: number) {
|
||||
return super.delete(id);
|
||||
}
|
||||
|
||||
@Post("/deleteByIds", { summary: "sys:settings:edit" })
|
||||
@Post("/deleteByIds", { description: "sys:settings:edit" })
|
||||
async deleteByIds(@Body("ids") ids: number[]) {
|
||||
const res = await this.service.delete(ids);
|
||||
return this.ok(res);
|
||||
}
|
||||
@Post("/setDisabled", { summary: "sys:settings:edit" })
|
||||
@Post("/setDisabled", { description: "sys:settings:edit" })
|
||||
async setDisabled(@Body("id") id: number, @Body("disabled") disabled: boolean) {
|
||||
await this.service.setDisabled(id, disabled);
|
||||
return this.ok();
|
||||
|
||||
@@ -23,18 +23,18 @@ export class SysProjectMemberController extends CrudController<ProjectMemberEnti
|
||||
return this.service;
|
||||
}
|
||||
|
||||
@Post("/page", { summary: "sys:settings:view" })
|
||||
@Post("/page", { description: "sys:settings:view" })
|
||||
async page(@Body(ALL) body: any) {
|
||||
body.query = body.query ?? {};
|
||||
return await super.page(body);
|
||||
}
|
||||
|
||||
@Post("/list", { summary: "sys:settings:view" })
|
||||
@Post("/list", { description: "sys:settings:view" })
|
||||
async list(@Body(ALL) body: any) {
|
||||
return super.list(body);
|
||||
}
|
||||
|
||||
@Post("/add", { summary: "sys:settings:edit" })
|
||||
@Post("/add", { description: "sys:settings:edit" })
|
||||
async add(@Body(ALL) bean: any) {
|
||||
const def: any = {
|
||||
isDefault: false,
|
||||
@@ -50,7 +50,7 @@ export class SysProjectMemberController extends CrudController<ProjectMemberEnti
|
||||
return super.add(bean);
|
||||
}
|
||||
|
||||
@Post("/update", { summary: "sys:settings:edit" })
|
||||
@Post("/update", { description: "sys:settings:edit" })
|
||||
async update(@Body(ALL) bean: any) {
|
||||
if (!bean.id) {
|
||||
throw new Error("id is required");
|
||||
@@ -68,7 +68,7 @@ export class SysProjectMemberController extends CrudController<ProjectMemberEnti
|
||||
return this.ok(res);
|
||||
}
|
||||
|
||||
@Post("/info", { summary: "sys:settings:view" })
|
||||
@Post("/info", { description: "sys:settings:view" })
|
||||
async info(@Query("id") id: number) {
|
||||
if (!id) {
|
||||
throw new Error("id is required");
|
||||
@@ -81,7 +81,7 @@ export class SysProjectMemberController extends CrudController<ProjectMemberEnti
|
||||
return super.info(id);
|
||||
}
|
||||
|
||||
@Post("/delete", { summary: "sys:settings:edit" })
|
||||
@Post("/delete", { description: "sys:settings:edit" })
|
||||
async delete(@Query("id") id: number) {
|
||||
if (!id) {
|
||||
throw new Error("id is required");
|
||||
@@ -94,7 +94,7 @@ export class SysProjectMemberController extends CrudController<ProjectMemberEnti
|
||||
return super.delete(id);
|
||||
}
|
||||
|
||||
@Post("/deleteByIds", { summary: "sys:settings:edit" })
|
||||
@Post("/deleteByIds", { description: "sys:settings:edit" })
|
||||
async deleteByIds(@Body("ids") ids: number[]) {
|
||||
for (const id of ids) {
|
||||
if (!id) {
|
||||
|
||||
Reference in New Issue
Block a user