diff --git a/controllers/discordactions.js b/controllers/discordactions.js index 7a6f64fcf..c29a443ce 100644 --- a/controllers/discordactions.js +++ b/controllers/discordactions.js @@ -38,6 +38,7 @@ const createGroupRole = async (req, res) => { const groupRoleData = { rolename, createdBy: req.userData.id, + description: req.body.description || "", date: admin.firestore.Timestamp.fromDate(new Date()), }; diff --git a/middlewares/validators/discordactions.js b/middlewares/validators/discordactions.js index b325e4216..96db3b09b 100644 --- a/middlewares/validators/discordactions.js +++ b/middlewares/validators/discordactions.js @@ -4,6 +4,7 @@ const { validateMillisecondsTimestamp } = require("./utils"); const validateGroupRoleBody = async (req, res, next) => { const schema = Joi.object({ rolename: Joi.string().trim().required(), + description: Joi.string().trim(), }); try {