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}`); });