Update BookmarkController
This commit is contained in:
parent
86d7d1a928
commit
a230265d7b
|
@ -26,6 +26,10 @@ class BookmarkController extends Controller
|
||||||
['status_id' => $status->id], ['profile_id' => $profile->id]
|
['status_id' => $status->id], ['profile_id' => $profile->id]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if(!$bookmark->wasRecentlyCreated) {
|
||||||
|
$bookmark->delete();
|
||||||
|
}
|
||||||
|
|
||||||
if($request->ajax()) {
|
if($request->ajax()) {
|
||||||
$response = ['code' => 200, 'msg' => 'Bookmark saved!'];
|
$response = ['code' => 200, 'msg' => 'Bookmark saved!'];
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue