Update ApiV1Controller, fix typo in statusFavouriteById method

This commit is contained in:
Daniel Supernault 2022-09-01 01:33:22 -06:00
parent e11d1336c6
commit c91a6a7542
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -1113,7 +1113,7 @@ class ApiV1Controller extends Controller
$like->is_comment = !empty($status['in_reply_to_id']);
$like->save();
Status::findOrFail($status['id'])->update([
'favourites_count' => ($status['favourites_count'] ?? 0) + 1
'likes_count' => ($status['favourites_count'] ?? 0) + 1
]);
LikePipeline::dispatch($like);
}