Update BookmarkService, use sorted set

This commit is contained in:
Daniel Supernault 2022-01-28 18:27:53 -07:00
parent 0157566c25
commit a11772bcfe
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
3 changed files with 30 additions and 5 deletions

View file

@ -6,6 +6,7 @@ use App\Bookmark;
use App\Status;
use Auth;
use Illuminate\Http\Request;
use App\Services\BookmarkService;
class BookmarkController extends Controller
{
@ -28,7 +29,10 @@ class BookmarkController extends Controller
);
if (!$bookmark->wasRecentlyCreated) {
BookmarkService::del($profile->id, $status->id);
$bookmark->delete();
} else {
BookmarkService::add($profile->id, $status->id);
}
if ($request->ajax()) {