From 04952692d336d68796f388a9f5ffd7e47e123f7b Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 18 Dec 2025 14:13:10 +0100 Subject: [PATCH] fix rest api endpoint PUT /folder/{id}/comment --- restapi/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/restapi/index.php b/restapi/index.php index 7ca7dcd3e..5bc4535eb 100644 --- a/restapi/index.php +++ b/restapi/index.php @@ -2659,8 +2659,8 @@ final class SeedDMS_RestapiController { /* {{{ */ $params = $request->getParsedBody(); /* Setting an empty comment is allowed. */ - if ($params['comment']) { - return $this->renderer->json($response, array('success'=>false, 'message'=>'You must supply a new name', 'data'=>''))->withStatus(400); + if (empty($params['comment'])) { + return $this->renderer->json($response, array('success'=>false, 'message'=>'You must supply a new comment', 'data'=>''))->withStatus(400); } $newcomment = $params['comment'];