mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-29 09:43:16 +00:00
Update ApiV1Controller, improve favourites endpoint
This commit is contained in:
parent
156940c399
commit
2848620a32
1 changed files with 7 additions and 0 deletions
|
@ -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([
|
$like = Like::firstOrCreate([
|
||||||
'profile_id' => $user->profile_id,
|
'profile_id' => $user->profile_id,
|
||||||
'status_id' => $status['id']
|
'status_id' => $status['id']
|
||||||
|
|
Loading…
Reference in a new issue