Update ApiV1Controller, improve favourites endpoint

pull/3235/head
Daniel Supernault 3 years ago
parent 156940c399
commit 2848620a32
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7

@ -1040,6 +1040,13 @@ class ApiV1Controller extends Controller
}
}
abort_if(
Like::whereProfileId($user->profile_id)
->where('created_at', '>', now()->subDay())
->count() >= 100,
429
);
$like = Like::firstOrCreate([
'profile_id' => $user->profile_id,
'status_id' => $status['id']

Loading…
Cancel
Save