mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-25 06:23:18 +00:00
Update InternalApiController, fixes #1901
This commit is contained in:
parent
2189dfb5f6
commit
758e633c2c
1 changed files with 2 additions and 6 deletions
|
@ -244,7 +244,7 @@ class InternalApiController extends Controller
|
||||||
'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'
|
'comments_disabled' => 'nullable'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if(config('costar.enabled') == true) {
|
if(config('costar.enabled') == true) {
|
||||||
|
@ -301,7 +301,7 @@ class InternalApiController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
if($request->filled('comments_disabled')) {
|
if($request->filled('comments_disabled')) {
|
||||||
$status->comments_disabled = $request->input('comments_disabled');
|
$status->comments_disabled = (bool) $request->input('comments_disabled');
|
||||||
}
|
}
|
||||||
|
|
||||||
$status->caption = strip_tags($request->caption);
|
$status->caption = strip_tags($request->caption);
|
||||||
|
@ -314,10 +314,6 @@ class InternalApiController extends Controller
|
||||||
$media->save();
|
$media->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
// $resource = new Fractal\Resource\Collection($status->media()->orderBy('order')->get(), new StatusMediaContainerTransformer());
|
|
||||||
// $mediaContainer = $this->fractal->createData($resource)->toArray();
|
|
||||||
// $status->media_container = json_encode($mediaContainer);
|
|
||||||
|
|
||||||
$visibility = $profile->unlisted == true && $visibility == 'public' ? 'unlisted' : $visibility;
|
$visibility = $profile->unlisted == true && $visibility == 'public' ? 'unlisted' : $visibility;
|
||||||
$cw = $profile->cw == true ? true : $cw;
|
$cw = $profile->cw == true ? true : $cw;
|
||||||
$status->is_nsfw = $cw;
|
$status->is_nsfw = $cw;
|
||||||
|
|
Loading…
Reference in a new issue