Skip to content

Commit

Permalink
fix: [ApiServer] enabled flag
Browse files Browse the repository at this point in the history
  • Loading branch information
wirwolf committed May 12, 2020
1 parent 3e28e8e commit 67434d0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/src/Modules/Api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ export class ApiServer {
}

public listen(): Promise<ApiServer> {

if (!this.config.enabled) {
Core.info('Module ApiServer is not enabled');
return Promise.resolve(this);
}
return new Promise<ApiServer | any>((resolve, reject) => {
if (!this.config.enabled) {
Core.info('Module ApiServer is not enabled');
resolve(this);
}

this.koa.use(async (ctx, next) => {
try {
await next();
Expand Down

0 comments on commit 67434d0

Please sign in to comment.