trying to fix status

This commit is contained in:
Luke Berndt
2024-02-25 19:10:49 -05:00
parent cd4446562d
commit 4fde3f062d

View File

@@ -445,8 +445,12 @@ exports.validateSystem = async function (req, res, next) {
}
res.locals.description = req.body.description.replace(/[^\w\s\.\,\-\_\(\)\'\"\!\?\*\&\^\%\$\#\@\r\n\t\`\~\[\]\/\\]/gi, '');
res.locals.status = req.body.status.replace(/[^\w\s\.\,\-\_\(\)\'\"\!\?\*\&\^\%\$\#\@\r\n\t\`\~\[\]\/\\]/gi, '');
if (req.body.status) {
res.locals.status = req.body.status.replace(/[^\w\s\.\,\-\_\(\)\'\"\!\?\*\&\^\%\$\#\@\r\n\t\`\~\[\]\/\\]/gi, '');
} else {
res.locals.status = "";
}
if (!req.body.shortName || (req.body.shortName.length < 2)) {
console.error("ERROR: Validate System - req.body.shortName");
res.status(500)