Update ApiV1Controller, improve favourites endpoint

pull/3235/head
Daniel Supernault 2022-02-13 00:32:25 -07:00
rodzic 156940c399
commit 2848620a32
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 0DEF1C662C9033F7
1 zmienionych plików z 7 dodań i 0 usunięć

Wyświetl plik

@ -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']