mirror of
https://github.com/certd/certd.git
synced 2026-05-16 21:27:34 +08:00
chore: 补充其他access的测试按钮
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { IsAccess, AccessInput, BaseAccess } from "@certd/pipeline";
|
||||
import { UniCloudClient } from "@certd/plugin-plus";
|
||||
|
||||
/**
|
||||
*/
|
||||
@@ -30,6 +31,27 @@ export class UniCloudAccess extends BaseAccess {
|
||||
})
|
||||
password = "";
|
||||
|
||||
// await this.getToken();
|
||||
|
||||
@AccessInput({
|
||||
title: "测试",
|
||||
component: {
|
||||
name: "api-test",
|
||||
action: "onTestRequest",
|
||||
},
|
||||
helper: "点击测试接口看是否正常",
|
||||
})
|
||||
testRequest = true;
|
||||
|
||||
async onTestRequest() {
|
||||
const client = new UniCloudClient({
|
||||
access: this,
|
||||
logger: this.ctx.logger,
|
||||
http: this.ctx.http,
|
||||
});
|
||||
await client.getToken();
|
||||
return "ok";
|
||||
}
|
||||
}
|
||||
|
||||
new UniCloudAccess();
|
||||
|
||||
Reference in New Issue
Block a user