diff --git a/src/api/board.ins/routes/root.ts b/src/api/board.ins/routes/root.ts index 93b1cbe..51e4881 100644 --- a/src/api/board.ins/routes/root.ts +++ b/src/api/board.ins/routes/root.ts @@ -29,14 +29,7 @@ export default class Root extends Route { }); } - if (!req.body.subject) { - return res.status(400).json({ - code: this.constants.codes.CLIENT_ERROR, - message: this.constants.messages.CLIENT_ERROR, - }); - } - - if (!req.body.body) { + if (!req.body.subject || !req.body.body) { return res.status(400).json({ code: this.constants.codes.CLIENT_ERROR, message: this.constants.messages.CLIENT_ERROR, @@ -60,7 +53,7 @@ export default class Root extends Route { embed.setColor('#dd3acd'); embed.addField('Subject', req.body.subject); embed.addField('Body', req.body.body); - embed.addField('ID', executiveOrder.oID); + embed.setDescription(executiveOrder.oID); embed.setTimestamp(new Date()); const channel = this.server.client.getChannel('807444198969835550'); @@ -90,14 +83,7 @@ export default class Root extends Route { }); } - if (!req.body.subject) { - return res.status(400).json({ - code: this.constants.codes.CLIENT_ERROR, - message: this.constants.messages.CLIENT_ERROR, - }); - } - - if (!req.body.body) { + if (!req.body.subject || !req.body.body) { return res.status(400).json({ code: this.constants.codes.CLIENT_ERROR, message: this.constants.messages.CLIENT_ERROR, @@ -115,7 +101,7 @@ export default class Root extends Route { embed.setColor('#66e1ff'); embed.addField('Subject', req.body.subject); embed.addField('Body', req.body.body); - embed.addField('ID', motionID); + embed.setDescription(motionID); embed.setTimestamp(new Date()); const channel = this.server.client.getChannel('807444198969835550');