perf: 授权加密支持解密查看

This commit is contained in:
xiaojunnuo
2024-10-28 18:20:10 +08:00
parent 6dabad76ba
commit 5575c83970
4 changed files with 56 additions and 1 deletions

View File

@@ -67,6 +67,12 @@ export class AccessController extends CrudController<AccessService> {
return this.ok(access);
}
@Post('/getSecretPlain', { summary: Constants.per.authOnly })
async getSecretPlain(@Body(ALL) body: { id: number; key: string }) {
const value = await this.service.getById(body.id, this.getUserId());
return this.ok(value[body.key]);
}
@Post('/accessTypeDict', { summary: Constants.per.authOnly })
async getAccessTypeDict() {
const list = this.service.getDefineList();