mirror of
https://github.com/certd/certd.git
synced 2026-05-17 05:37:30 +08:00
perf: 所有授权增加测试按钮
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { IsAccess, AccessInput, BaseAccess } from '@certd/pipeline';
|
||||
import { Dns51Client } from './client.js';
|
||||
|
||||
/**
|
||||
* 这个注解将注册一个授权配置
|
||||
@@ -27,14 +28,38 @@ export class Dns51Access extends BaseAccess {
|
||||
@AccessInput({
|
||||
title: '登录密码',
|
||||
component: {
|
||||
name:"a-input-password",
|
||||
vModel:"value",
|
||||
name: "a-input-password",
|
||||
vModel: "value",
|
||||
placeholder: '密码',
|
||||
},
|
||||
required: true,
|
||||
encrypt: true,
|
||||
})
|
||||
password = '';
|
||||
|
||||
@AccessInput({
|
||||
title: "测试",
|
||||
component: {
|
||||
name: "api-test",
|
||||
action: "TestRequest"
|
||||
},
|
||||
helper: "测试授权是否正确"
|
||||
})
|
||||
testRequest = true;
|
||||
|
||||
async onTestRequest() {
|
||||
|
||||
const client = new Dns51Client({
|
||||
logger: this.ctx.logger,
|
||||
access: this,
|
||||
});
|
||||
|
||||
await client.login();
|
||||
|
||||
return "ok";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
new Dns51Access();
|
||||
|
||||
Reference in New Issue
Block a user