backend: fix channel name length limits
This commit is contained in:
parent
96da377e4e
commit
444fcb2087
1 changed files with 2 additions and 2 deletions
|
@ -12,7 +12,7 @@ const router = express.Router();
|
|||
router.post(
|
||||
"/",
|
||||
authenticateRoute(),
|
||||
body("name").isLength({ min: 1, max: 40 }).isAlphanumeric("en-US", { ignore: " _-" }),
|
||||
body("name").isLength({ min: 1, max: 32 }).isAlphanumeric("en-US", { ignore: " _-" }),
|
||||
async (req, res) => {
|
||||
const validationErrors = validationResult(req);
|
||||
if (!validationErrors.isEmpty()) {
|
||||
|
@ -43,7 +43,7 @@ router.post(
|
|||
router.put(
|
||||
"/:id",
|
||||
authenticateRoute(),
|
||||
body("name").isLength({ min: 1, max: 40 }).isAlphanumeric("en-US", { ignore: " _-" }),
|
||||
body("name").isLength({ min: 1, max: 32 }).isAlphanumeric("en-US", { ignore: " _-" }),
|
||||
param("id").isNumeric(),
|
||||
async (req, res) => {
|
||||
const validationErrors = validationResult(req);
|
||||
|
|
Loading…
Reference in a new issue