mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-26 00:03:16 +00:00
Update Api Controllers
This commit is contained in:
parent
0b3c3021f5
commit
1cff278f9e
2 changed files with 4 additions and 4 deletions
|
@ -277,7 +277,7 @@ class InternalApiController extends Controller
|
||||||
public function composePost(Request $request)
|
public function composePost(Request $request)
|
||||||
{
|
{
|
||||||
$this->validate($request, [
|
$this->validate($request, [
|
||||||
'caption' => 'nullable|string',
|
'caption' => 'nullable|string|max:'.config('pixelfed.max_caption_length', 500),
|
||||||
'media.*' => 'required',
|
'media.*' => 'required',
|
||||||
'media.*.id' => 'required|integer|min:1',
|
'media.*.id' => 'required|integer|min:1',
|
||||||
'media.*.filter_class' => 'nullable|alpha_dash|max:30',
|
'media.*.filter_class' => 'nullable|alpha_dash|max:30',
|
||||||
|
|
|
@ -117,7 +117,7 @@ class PublicApiController extends Controller
|
||||||
if($request->filled('min_id')) {
|
if($request->filled('min_id')) {
|
||||||
$replies = $status->comments()
|
$replies = $status->comments()
|
||||||
->whereNull('reblog_of_id')
|
->whereNull('reblog_of_id')
|
||||||
->select('id', 'caption', 'rendered', 'profile_id', 'in_reply_to_id', 'type', 'reply_count', 'created_at')
|
->select('id', 'caption', 'is_nsfw', 'rendered', 'profile_id', 'in_reply_to_id', 'type', 'reply_count', 'created_at')
|
||||||
->where('id', '>=', $request->min_id)
|
->where('id', '>=', $request->min_id)
|
||||||
->orderBy('id', 'desc')
|
->orderBy('id', 'desc')
|
||||||
->paginate($limit);
|
->paginate($limit);
|
||||||
|
@ -125,7 +125,7 @@ class PublicApiController extends Controller
|
||||||
if($request->filled('max_id')) {
|
if($request->filled('max_id')) {
|
||||||
$replies = $status->comments()
|
$replies = $status->comments()
|
||||||
->whereNull('reblog_of_id')
|
->whereNull('reblog_of_id')
|
||||||
->select('id', 'caption', 'rendered', 'profile_id', 'in_reply_to_id', 'type', 'reply_count', 'created_at')
|
->select('id', 'caption', 'is_nsfw', 'rendered', 'profile_id', 'in_reply_to_id', 'type', 'reply_count', 'created_at')
|
||||||
->where('id', '<=', $request->max_id)
|
->where('id', '<=', $request->max_id)
|
||||||
->orderBy('id', 'desc')
|
->orderBy('id', 'desc')
|
||||||
->paginate($limit);
|
->paginate($limit);
|
||||||
|
@ -133,7 +133,7 @@ class PublicApiController extends Controller
|
||||||
} else {
|
} else {
|
||||||
$replies = $status->comments()
|
$replies = $status->comments()
|
||||||
->whereNull('reblog_of_id')
|
->whereNull('reblog_of_id')
|
||||||
->select('id', 'caption', 'rendered', 'profile_id', 'in_reply_to_id', 'type', 'reply_count', 'created_at')
|
->select('id', 'caption', 'is_nsfw', 'rendered', 'profile_id', 'in_reply_to_id', 'type', 'reply_count', 'created_at')
|
||||||
->orderBy('id', 'desc')
|
->orderBy('id', 'desc')
|
||||||
->paginate($limit);
|
->paginate($limit);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue