mirror of
https://github.com/certd/certd.git
synced 2026-07-15 10:17:33 +08:00
chore: format
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
import { ALL, Body, Controller, Inject, Post, Provide, Query } from '@midwayjs/core';
|
||||
import { CrudController } from '@certd/lib-server';
|
||||
import { PermissionService } from '../../../modules/sys/authority/service/permission-service.js';
|
||||
import { ALL, Body, Controller, Inject, Post, Provide, Query } from "@midwayjs/core";
|
||||
import { CrudController } from "@certd/lib-server";
|
||||
import { PermissionService } from "../../../modules/sys/authority/service/permission-service.js";
|
||||
|
||||
/**
|
||||
* 权限资源
|
||||
*/
|
||||
@Provide()
|
||||
@Controller('/api/sys/authority/permission')
|
||||
@Controller("/api/sys/authority/permission")
|
||||
export class PermissionController extends CrudController<PermissionService> {
|
||||
@Inject()
|
||||
service: PermissionService;
|
||||
@@ -15,7 +15,7 @@ export class PermissionController extends CrudController<PermissionService> {
|
||||
return this.service;
|
||||
}
|
||||
|
||||
@Post('/page', { description: 'sys:auth:per:view' })
|
||||
@Post("/page", { description: "sys:auth:per:view" })
|
||||
async page(
|
||||
@Body(ALL)
|
||||
body
|
||||
@@ -23,7 +23,7 @@ export class PermissionController extends CrudController<PermissionService> {
|
||||
return await super.page(body);
|
||||
}
|
||||
|
||||
@Post('/add', { description: 'sys:auth:per:add' })
|
||||
@Post("/add", { description: "sys:auth:per:add" })
|
||||
async add(
|
||||
@Body(ALL)
|
||||
bean
|
||||
@@ -31,22 +31,22 @@ export class PermissionController extends CrudController<PermissionService> {
|
||||
return await super.add(bean);
|
||||
}
|
||||
|
||||
@Post('/update', { description: 'sys:auth:per:edit' })
|
||||
@Post("/update", { description: "sys:auth:per:edit" })
|
||||
async update(
|
||||
@Body(ALL)
|
||||
bean
|
||||
) {
|
||||
return await super.update(bean);
|
||||
}
|
||||
@Post('/delete', { description: 'sys:auth:per:remove' })
|
||||
@Post("/delete", { description: "sys:auth:per:remove" })
|
||||
async delete(
|
||||
@Query('id')
|
||||
@Query("id")
|
||||
id: number
|
||||
) {
|
||||
return await super.delete(id);
|
||||
}
|
||||
|
||||
@Post('/tree', { description: 'sys:auth:per:view' })
|
||||
@Post("/tree", { description: "sys:auth:per:view" })
|
||||
async tree() {
|
||||
const tree = await this.service.tree({});
|
||||
return this.ok(tree);
|
||||
|
||||
Reference in New Issue
Block a user