From 35a8fb37489e0c8aaed202e831f1e0e4282132fc Mon Sep 17 00:00:00 2001 From: SupertigerDev Date: Sat, 29 Jul 2023 16:56:20 +0100 Subject: [PATCH] Made suspend reason be required. --- src/routes/moderation/userBatchSuspend.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/routes/moderation/userBatchSuspend.ts b/src/routes/moderation/userBatchSuspend.ts index ea6c768f..1be9068f 100644 --- a/src/routes/moderation/userBatchSuspend.ts +++ b/src/routes/moderation/userBatchSuspend.ts @@ -32,7 +32,9 @@ export function userBatchSuspend(Router: Router) { .isLength({ min: 0, max: 5 }) .withMessage('Days must be less than 99999'), body('reason') - .optional() + .not() + .isEmpty() + .withMessage('Reason is required.') .isString() .withMessage('Reason must be a string.') .isLength({ min: 0, max: 500 })