mirror of
https://github.com/certd/certd.git
synced 2026-04-22 10:57:25 +08:00
chore: 修改权限判断字段从summary改成description
This commit is contained in:
@@ -23,18 +23,18 @@ export class PluginController extends CrudController<PluginService> {
|
||||
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,
|
||||
@@ -44,58 +44,58 @@ export class PluginController extends CrudController<PluginService> {
|
||||
return super.add(bean);
|
||||
}
|
||||
|
||||
@Post('/update', { summary: 'sys:settings:edit' })
|
||||
@Post('/update', { description: 'sys:settings:edit' })
|
||||
async update(@Body(ALL) bean: any) {
|
||||
|
||||
const res = await super.update(bean);
|
||||
return res
|
||||
}
|
||||
|
||||
@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.deleteByIds([id]);
|
||||
}
|
||||
|
||||
@Post('/deleteByIds', { summary: 'sys:settings:edit' })
|
||||
@Post('/deleteByIds', { description: 'sys:settings:edit' })
|
||||
async deleteByIds(@Body('ids') ids: number[]) {
|
||||
const res = await this.service.deleteByIds(ids);
|
||||
return this.ok(res);
|
||||
}
|
||||
|
||||
@Post('/setDisabled', { summary: 'sys:settings:edit' })
|
||||
@Post('/setDisabled', { description: 'sys:settings:edit' })
|
||||
async setDisabled(@Body(ALL) body: { id: number; name: string; type: string; disabled: boolean }) {
|
||||
await this.service.setDisabled(body);
|
||||
return this.ok();
|
||||
}
|
||||
@Post('/getCommPluginConfigs', { summary: 'sys:settings:view' })
|
||||
@Post('/getCommPluginConfigs', { description: 'sys:settings:view' })
|
||||
async getCommPluginConfigs() {
|
||||
const res = await this.pluginConfigService.getCommPluginConfig();
|
||||
return this.ok(res);
|
||||
}
|
||||
|
||||
@Post('/saveCommPluginConfigs', { summary: 'sys:settings:edit' })
|
||||
@Post('/saveCommPluginConfigs', { description: 'sys:settings:edit' })
|
||||
async saveCommPluginConfigs(@Body(ALL) body: CommPluginConfig) {
|
||||
const res = await this.pluginConfigService.saveCommPluginConfig(body);
|
||||
return this.ok(res);
|
||||
}
|
||||
@Post('/saveSetting', { summary: 'sys:settings:edit' })
|
||||
@Post('/saveSetting', { description: 'sys:settings:edit' })
|
||||
async saveSetting(@Body(ALL) body: PluginConfig) {
|
||||
const res = await this.pluginConfigService.savePluginConfig(body);
|
||||
return this.ok(res);
|
||||
}
|
||||
|
||||
@Post('/import', { summary: 'sys:settings:edit' })
|
||||
@Post('/import', { description: 'sys:settings:edit' })
|
||||
async import(@Body(ALL) body: PluginImportReq) {
|
||||
const res = await this.service.importPlugin(body);
|
||||
return this.ok(res);
|
||||
}
|
||||
|
||||
@Post('/export', { summary: 'sys:settings:edit' })
|
||||
@Post('/export', { description: 'sys:settings:edit' })
|
||||
async export(@Body('id') id: number) {
|
||||
const res = await this.service.exportPlugin(id);
|
||||
return this.ok(res);
|
||||
|
||||
Reference in New Issue
Block a user