fix rest api endpoint PUT /folder/{id}/comment

This commit is contained in:
Uwe Steinmann 2025-12-18 14:13:10 +01:00
parent 736c30623a
commit 04952692d3

View File

@ -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'];