- Fix UpdatePostRequest missing content_type, synced, meta fields (content_type was silently dropped, causing Instagram Reels to post as Feed) - Create API FormRequests (StorePostRequest, UpdatePostRequest) replacing inline validation - Fix syntax errors in all publishers ($media->isVideo() missing variable) - Fix Instagram Feed with single video calling publishSingleImage instead of publishReel - Fix TikTok hardcoded SELF_ONLY privacy — now queries creator_info API - Refactor YouTubePublisher to use google/apiclient SDK with chunked resumable upload - Fix all publishers using file_get_contents for large videos (memory overflow) — X, LinkedIn, LinkedInPage, Pinterest, Bluesky, Mastodon now use temp file + stream - Fix Media::isVideo/isImage to use mime_type instead of extension - Fix Threads not saving refresh_token (was null, now saves access_token) - Add Instagram token refresh to publisher and ConnectionVerifier - Fix PublishToSocialPlatform job: tries 3→1 (prevents duplicate uploads), timeout 60→600s, added failed() method for cleanup - Increase Horizon worker timeout 60→630s, Redis retry_after 90→660s - Increase upload limit 500MB→1GB - Add mastodon to getDefaultContentType in Edit.vue
34 lines
1 KiB
PHP
34 lines
1 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Http\Requests\Api\Post;
|
|
|
|
use App\Enums\Post\Status;
|
|
use App\Enums\PostPlatform\ContentType;
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
use Illuminate\Validation\Rule;
|
|
|
|
class UpdatePostRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'status' => ['required', 'string', Rule::in(array_column(Status::cases(), 'value'))],
|
|
'synced' => ['required', 'boolean'],
|
|
'platforms' => ['required', 'array'],
|
|
'platforms.*.id' => ['required', 'uuid'],
|
|
'platforms.*.content' => ['nullable', 'string', 'max:63206'],
|
|
'platforms.*.content_type' => ['required', 'string', Rule::in(array_column(ContentType::cases(), 'value'))],
|
|
'platforms.*.meta' => ['nullable', 'array'],
|
|
'scheduled_at' => ['nullable', 'date'],
|
|
'label_ids' => ['sometimes', 'array'],
|
|
'label_ids.*' => ['uuid'],
|
|
];
|
|
}
|
|
}
|