mirror of https://github.com/pixelfed/pixelfed.git
Update InternalApiController for ComposeUI v4
This commit is contained in:
parent
58a9ca664c
commit
a3ae352fd2
|
@ -240,7 +240,8 @@ class InternalApiController extends Controller
|
||||||
'media.*.license' => 'nullable|string|max:80',
|
'media.*.license' => 'nullable|string|max:80',
|
||||||
'cw' => 'nullable|boolean',
|
'cw' => 'nullable|boolean',
|
||||||
'visibility' => 'required|string|in:public,private,unlisted|min:2|max:10',
|
'visibility' => 'required|string|in:public,private,unlisted|min:2|max:10',
|
||||||
'place' => 'nullable'
|
'place' => 'nullable',
|
||||||
|
'comments_disabled' => 'nullable|boolean'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if(config('costar.enabled') == true) {
|
if(config('costar.enabled') == true) {
|
||||||
|
@ -287,9 +288,15 @@ class InternalApiController extends Controller
|
||||||
if($request->filled('place')) {
|
if($request->filled('place')) {
|
||||||
$status->place_id = $request->input('place')['id'];
|
$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->caption = strip_tags($request->caption);
|
||||||
$status->scope = 'draft';
|
$status->scope = 'draft';
|
||||||
$status->profile_id = $profile->id;
|
$status->profile_id = $profile->id;
|
||||||
|
|
||||||
$status->save();
|
$status->save();
|
||||||
|
|
||||||
foreach($attachments as $media) {
|
foreach($attachments as $media) {
|
||||||
|
|
Loading…
Reference in New Issue