From 244869b7c2fcf4981e9541173fbae8b864e9c6a7 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 22 Mar 2022 23:35:16 -0600 Subject: [PATCH] Update ApiV1Controller, fix statusCreate validator --- app/Http/Controllers/Api/ApiV1Controller.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/Api/ApiV1Controller.php b/app/Http/Controllers/Api/ApiV1Controller.php index 5893bfef5..17f3afcdd 100644 --- a/app/Http/Controllers/Api/ApiV1Controller.php +++ b/app/Http/Controllers/Api/ApiV1Controller.php @@ -2086,9 +2086,8 @@ class ApiV1Controller extends Controller $this->validate($request, [ 'status' => 'nullable|string', 'in_reply_to_id' => 'nullable', - 'media_ids' => 'array|max:' . config_cache('pixelfed.max_album_length'), - 'media_ids.*' => 'integer|min:1', - 'sensitive' => 'nullable|boolean', + 'media_ids' => 'sometimes|array|max:' . config_cache('pixelfed.max_album_length'), + 'sensitive' => 'nullable', 'visibility' => 'string|in:private,unlisted,public', ]);