merge-requests/4/head
Matthew 2020-07-23 01:22:44 -04:00
parent 5f85dab318
commit 2f06294192
No known key found for this signature in database
GPG Key ID: 210AF32ADE3B5C4B
2 changed files with 3 additions and 1 deletions

View File

@ -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 = <TextChannel> 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);
}

View File

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