Skip to content

Commit

Permalink
move restify parsers initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
webus committed Jan 14, 2018
1 parent 942c53b commit 9729b9e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/botstack.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ class BotStack {
constructor(botName = 'default bot', { useSmoochWebhook = false } = {}) {
this.botName = botName;
this.server = restify.createServer();
this.server.use(restify.queryParser());
this.server.use(restify.bodyParser());
this.restify = restify;

// utils
Expand Down Expand Up @@ -448,8 +450,6 @@ class BotStack {
await environments.checkEnvironmentVariables(this);
await environments.processEnvironmentVariables(this);

this.server.use(restify.queryParser());
this.server.use(restify.bodyParser());
this.events = BotStackEmitterInit;
this.state = state;

Expand Down

0 comments on commit 9729b9e

Please sign in to comment.