mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 14:31:26 +00:00
Update InternalApiController for ComposeUI v4
This commit is contained in:
parent
58a9ca664c
commit
a3ae352fd2
1 changed files with 8 additions and 1 deletions
|
@ -240,7 +240,8 @@ class InternalApiController extends Controller
|
|||
'media.*.license' => 'nullable|string|max:80',
|
||||
'cw' => 'nullable|boolean',
|
||||
'visibility' => 'required|string|in:public,private,unlisted|min:2|max:10',
|
||||
'place' => 'nullable'
|
||||
'place' => 'nullable',
|
||||
'comments_disabled' => 'nullable|boolean'
|
||||
]);
|
||||
|
||||
if(config('costar.enabled') == true) {
|
||||
|
@ -287,9 +288,15 @@ class InternalApiController extends Controller
|
|||
if($request->filled('place')) {
|
||||
$status->place_id = $request->input('place')['id'];
|
||||
}
|
||||
|
||||
if($request->filled('comments_disabled')) {
|
||||
$status->comments_disabled = $request->input('comments_disabled');
|
||||
}
|
||||
|
||||
$status->caption = strip_tags($request->caption);
|
||||
$status->scope = 'draft';
|
||||
$status->profile_id = $profile->id;
|
||||
|
||||
$status->save();
|
||||
|
||||
foreach($attachments as $media) {
|
||||
|
|
Loading…
Reference in a new issue