Make sure discussion post IDs are ordered correctly

This commit is contained in:
Toby Zerner 2015-06-24 18:57:07 +09:30
parent 4624ddb849
commit 57fc62eaf1

View File

@ -92,7 +92,7 @@ class ShowAction extends SerializeResourceAction
$discussion = $this->discussions->findOrFail($request->get('id'), $user);
$discussion->posts_ids = $discussion->visiblePosts($user)->lists('id');
$discussion->posts_ids = $discussion->visiblePosts($user)->orderBy('time')->lists('id');
if (in_array('posts', $request->include)) {
$length = strlen($prefix = 'posts.');