From 2f06294192d4364f3b15e8f995f1538339a45613 Mon Sep 17 00:00:00 2001 From: Matthew R Date: Thu, 23 Jul 2020 01:22:44 -0400 Subject: [PATCH] fixes --- src/api/routes/Webhook.ts | 3 ++- src/class/Server.ts | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/api/routes/Webhook.ts b/src/api/routes/Webhook.ts index 213cc97..90b540b 100644 --- a/src/api/routes/Webhook.ts +++ b/src/api/routes/Webhook.ts @@ -22,7 +22,8 @@ export default class Webhook extends Route { embed.setFooter(this.server.client.user.username, this.server.client.user.avatarURL); embed.setTimestamp(); const chan = this.server.client.getChannel('580950455581147146'); - return chan.createMessage({ embed }); + chan.createMessage({ embed }); + return res.status(200).json({ code: this.constants.codes.SUCCESS, message: this.constants.codes.SUCCESS }); } catch (err) { return this.handleError(err, res); } diff --git a/src/class/Server.ts b/src/class/Server.ts index 88d6e82..f778ef1 100644 --- a/src/class/Server.ts +++ b/src/class/Server.ts @@ -64,6 +64,7 @@ export default class Server { }, })); this.app.use(bodyParser.json()); + this.app.use(bodyParser.urlencoded({ extended: true })); this.app.listen(this.options.port, () => { this.client.signale.success(`API Server listening on port ${this.options.port}`); });