fix(core): update
This commit is contained in:
parent
3e0d01520e
commit
a69fee7985
@ -6,15 +6,18 @@ export class AgTestServer {
|
||||
|
||||
constructor(handlerArg?: plugins.agSdk.AAgHandler<any>) {
|
||||
if (handlerArg) {
|
||||
this.handlers.push(handlerArg);
|
||||
this.addAgHandler(handlerArg);
|
||||
}
|
||||
}
|
||||
|
||||
public async addAgHandler(handlerArg: plugins.agSdk.AAgHandler<any>) {
|
||||
this.handlers.push(handlerArg);
|
||||
console.log(`added handler with slug ${handlerArg.slug}`);
|
||||
if (this.server && this.server.serverStatus === 'running') {
|
||||
await this.stop();
|
||||
await this.start();
|
||||
}
|
||||
}
|
||||
|
||||
public async start() {
|
||||
this.server = new plugins.smartexpress.Server({
|
||||
|
Loading…
Reference in New Issue
Block a user