From 94de71140be2d0c80bf6a2e03cb9381b37736ed5 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Fri, 06 Feb 2026 17:03:02 +0000
Subject: [PATCH] =Some minor CRUD.js and UploadManager.js tweaks
---
inc/rest/routes/ContentRoutes.php | 20 +++++++++++++++++++-
1 files changed, 19 insertions(+), 1 deletions(-)
diff --git a/inc/rest/routes/ContentRoutes.php b/inc/rest/routes/ContentRoutes.php
index 119b3a1..bbeefce 100644
--- a/inc/rest/routes/ContentRoutes.php
+++ b/inc/rest/routes/ContentRoutes.php
@@ -76,10 +76,27 @@
Route::for('content')
->get([$this, 'getContent'])
->auth(PermissionHandler::combine(['user', 'nonce', ['actionNonce'=>'dash-']]))
+ ->args([
+ 'content' => 'string|required',
+ 'status' => 'string|default:all',
+ 'page' => 'integer|default:1|min:1',
+ 'per_page' => 'integer|default:30|min:1|max:100',
+ 'orderby' => 'string|enum:date,alphabetical|default:date',
+ 'order' => 'string|enum:asc,desc|default:desc',
+ 'search' => 'string',
+ 'date-filter' => 'string',
+ 'dateFrom' => 'string',
+ 'dateTo' => 'string',
+ ])
->rateLimit(20)
->post([$this, 'postContent'])
->auth(PermissionHandler::combine(['user', 'nonce', ['actionNonce'=>'dash-']]))
- ->rateLimit(30);
+ ->rateLimit(30)
+ ->args([
+ 'user' => 'int|required',
+ 'posts' => 'required',
+ 'content' => 'string',
+ ]);
}
protected function initTimelineFields(string $content): void
@@ -151,6 +168,7 @@
return Response::success(['message'=>'No posts found in request']);
}
+
$count = count($data['posts']);
$operationId = $data['id'];
unset($data['user']);
--
Gitblit v1.10.0