mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-25 15:55:22 +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',
|
'scope',
|
||||||
'local',
|
'local',
|
||||||
'place_id',
|
'place_id',
|
||||||
|
'likes_count',
|
||||||
|
'reblogs_count',
|
||||||
'created_at',
|
'created_at',
|
||||||
'updated_at'
|
'updated_at'
|
||||||
)->whereProfileId($profile->id)
|
)->whereProfileId($profile->id)
|
||||||
|
@ -335,6 +337,8 @@ class ApiV1Controller extends Controller
|
||||||
'scope',
|
'scope',
|
||||||
'local',
|
'local',
|
||||||
'place_id',
|
'place_id',
|
||||||
|
'likes_count',
|
||||||
|
'reblogs_count',
|
||||||
'created_at',
|
'created_at',
|
||||||
'updated_at'
|
'updated_at'
|
||||||
)->whereProfileId($profile->id)
|
)->whereProfileId($profile->id)
|
||||||
|
@ -1224,6 +1228,8 @@ class ApiV1Controller extends Controller
|
||||||
'scope',
|
'scope',
|
||||||
'local',
|
'local',
|
||||||
'reply_count',
|
'reply_count',
|
||||||
|
'likes_count',
|
||||||
|
'reblogs_count',
|
||||||
'comments_disabled',
|
'comments_disabled',
|
||||||
'place_id',
|
'place_id',
|
||||||
'created_at',
|
'created_at',
|
||||||
|
@ -1251,6 +1257,8 @@ class ApiV1Controller extends Controller
|
||||||
'local',
|
'local',
|
||||||
'reply_count',
|
'reply_count',
|
||||||
'comments_disabled',
|
'comments_disabled',
|
||||||
|
'likes_count',
|
||||||
|
'reblogs_count',
|
||||||
'place_id',
|
'place_id',
|
||||||
'created_at',
|
'created_at',
|
||||||
'updated_at'
|
'updated_at'
|
||||||
|
@ -1319,6 +1327,8 @@ class ApiV1Controller extends Controller
|
||||||
'reply_count',
|
'reply_count',
|
||||||
'comments_disabled',
|
'comments_disabled',
|
||||||
'place_id',
|
'place_id',
|
||||||
|
'likes_count',
|
||||||
|
'reblogs_count',
|
||||||
'created_at',
|
'created_at',
|
||||||
'updated_at'
|
'updated_at'
|
||||||
)->whereNull('uri')
|
)->whereNull('uri')
|
||||||
|
@ -1345,6 +1355,8 @@ class ApiV1Controller extends Controller
|
||||||
'reply_count',
|
'reply_count',
|
||||||
'comments_disabled',
|
'comments_disabled',
|
||||||
'place_id',
|
'place_id',
|
||||||
|
'likes_count',
|
||||||
|
'reblogs_count',
|
||||||
'created_at',
|
'created_at',
|
||||||
'updated_at'
|
'updated_at'
|
||||||
)->whereNull('uri')
|
)->whereNull('uri')
|
||||||
|
|
|
@ -275,6 +275,8 @@ class PublicApiController extends Controller
|
||||||
'reply_count',
|
'reply_count',
|
||||||
'comments_disabled',
|
'comments_disabled',
|
||||||
'place_id',
|
'place_id',
|
||||||
|
'likes_count',
|
||||||
|
'reblogs_count',
|
||||||
'created_at',
|
'created_at',
|
||||||
'updated_at'
|
'updated_at'
|
||||||
)->where('id', $dir, $id)
|
)->where('id', $dir, $id)
|
||||||
|
@ -304,6 +306,8 @@ class PublicApiController extends Controller
|
||||||
'comments_disabled',
|
'comments_disabled',
|
||||||
'created_at',
|
'created_at',
|
||||||
'place_id',
|
'place_id',
|
||||||
|
'likes_count',
|
||||||
|
'reblogs_count',
|
||||||
'updated_at'
|
'updated_at'
|
||||||
)->whereIn('type', ['photo', 'photo:album', 'video', 'video:album'])
|
)->whereIn('type', ['photo', 'photo:album', 'video', 'video:album'])
|
||||||
->with('profile', 'hashtags', 'mentions')
|
->with('profile', 'hashtags', 'mentions')
|
||||||
|
@ -384,6 +388,8 @@ class PublicApiController extends Controller
|
||||||
'reply_count',
|
'reply_count',
|
||||||
'comments_disabled',
|
'comments_disabled',
|
||||||
'place_id',
|
'place_id',
|
||||||
|
'likes_count',
|
||||||
|
'reblogs_count',
|
||||||
'created_at',
|
'created_at',
|
||||||
'updated_at'
|
'updated_at'
|
||||||
)->whereIn('type', ['photo', 'photo:album', 'video', 'video:album'])
|
)->whereIn('type', ['photo', 'photo:album', 'video', 'video:album'])
|
||||||
|
@ -411,6 +417,8 @@ class PublicApiController extends Controller
|
||||||
'reply_count',
|
'reply_count',
|
||||||
'comments_disabled',
|
'comments_disabled',
|
||||||
'place_id',
|
'place_id',
|
||||||
|
'likes_count',
|
||||||
|
'reblogs_count',
|
||||||
'created_at',
|
'created_at',
|
||||||
'updated_at'
|
'updated_at'
|
||||||
)->whereIn('type', ['photo', 'photo:album', 'video', 'video:album'])
|
)->whereIn('type', ['photo', 'photo:album', 'video', 'video:album'])
|
||||||
|
@ -626,7 +634,6 @@ class PublicApiController extends Controller
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$dir = $min_id ? '>' : '<';
|
$dir = $min_id ? '>' : '<';
|
||||||
$id = $min_id ?? $max_id;
|
$id = $min_id ?? $max_id;
|
||||||
$timeline = Status::select(
|
$timeline = Status::select(
|
||||||
|
|
Loading…
Reference in a new issue