mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 06:21:27 +00:00
Update ApiControllers, fix missing share/like counts
This commit is contained in:
parent
1346b75887
commit
788f76cf35
2 changed files with 20 additions and 1 deletions
|
@ -312,6 +312,8 @@ class ApiV1Controller extends Controller
|
|||
'scope',
|
||||
'local',
|
||||
'place_id',
|
||||
'likes_count',
|
||||
'reblogs_count',
|
||||
'created_at',
|
||||
'updated_at'
|
||||
)->whereProfileId($profile->id)
|
||||
|
@ -335,6 +337,8 @@ class ApiV1Controller extends Controller
|
|||
'scope',
|
||||
'local',
|
||||
'place_id',
|
||||
'likes_count',
|
||||
'reblogs_count',
|
||||
'created_at',
|
||||
'updated_at'
|
||||
)->whereProfileId($profile->id)
|
||||
|
@ -1224,6 +1228,8 @@ class ApiV1Controller extends Controller
|
|||
'scope',
|
||||
'local',
|
||||
'reply_count',
|
||||
'likes_count',
|
||||
'reblogs_count',
|
||||
'comments_disabled',
|
||||
'place_id',
|
||||
'created_at',
|
||||
|
@ -1251,6 +1257,8 @@ class ApiV1Controller extends Controller
|
|||
'local',
|
||||
'reply_count',
|
||||
'comments_disabled',
|
||||
'likes_count',
|
||||
'reblogs_count',
|
||||
'place_id',
|
||||
'created_at',
|
||||
'updated_at'
|
||||
|
@ -1319,6 +1327,8 @@ class ApiV1Controller extends Controller
|
|||
'reply_count',
|
||||
'comments_disabled',
|
||||
'place_id',
|
||||
'likes_count',
|
||||
'reblogs_count',
|
||||
'created_at',
|
||||
'updated_at'
|
||||
)->whereNull('uri')
|
||||
|
@ -1345,6 +1355,8 @@ class ApiV1Controller extends Controller
|
|||
'reply_count',
|
||||
'comments_disabled',
|
||||
'place_id',
|
||||
'likes_count',
|
||||
'reblogs_count',
|
||||
'created_at',
|
||||
'updated_at'
|
||||
)->whereNull('uri')
|
||||
|
|
|
@ -275,6 +275,8 @@ class PublicApiController extends Controller
|
|||
'reply_count',
|
||||
'comments_disabled',
|
||||
'place_id',
|
||||
'likes_count',
|
||||
'reblogs_count',
|
||||
'created_at',
|
||||
'updated_at'
|
||||
)->where('id', $dir, $id)
|
||||
|
@ -304,6 +306,8 @@ class PublicApiController extends Controller
|
|||
'comments_disabled',
|
||||
'created_at',
|
||||
'place_id',
|
||||
'likes_count',
|
||||
'reblogs_count',
|
||||
'updated_at'
|
||||
)->whereIn('type', ['photo', 'photo:album', 'video', 'video:album'])
|
||||
->with('profile', 'hashtags', 'mentions')
|
||||
|
@ -384,6 +388,8 @@ class PublicApiController extends Controller
|
|||
'reply_count',
|
||||
'comments_disabled',
|
||||
'place_id',
|
||||
'likes_count',
|
||||
'reblogs_count',
|
||||
'created_at',
|
||||
'updated_at'
|
||||
)->whereIn('type', ['photo', 'photo:album', 'video', 'video:album'])
|
||||
|
@ -411,6 +417,8 @@ class PublicApiController extends Controller
|
|||
'reply_count',
|
||||
'comments_disabled',
|
||||
'place_id',
|
||||
'likes_count',
|
||||
'reblogs_count',
|
||||
'created_at',
|
||||
'updated_at'
|
||||
)->whereIn('type', ['photo', 'photo:album', 'video', 'video:album'])
|
||||
|
@ -626,7 +634,6 @@ class PublicApiController extends Controller
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
$dir = $min_id ? '>' : '<';
|
||||
$id = $min_id ?? $max_id;
|
||||
$timeline = Status::select(
|
||||
|
|
Loading…
Reference in a new issue