|
@@ 62-64 (lines=3) @@
|
| 59 |
|
} else { |
| 60 |
|
$wishlists = Wishlist::getWishlist($user_id, $wishlist_ids); |
| 61 |
|
if (empty($wishlists)) { |
| 62 |
|
if (null !== $wishlist = Wishlist::createWishlist(Yii::$app->request->post('title'), $user_id, $wishlist_ids, true)) { |
| 63 |
|
$wishlist->addToWishlist($itemId); |
| 64 |
|
} |
| 65 |
|
return $result[] = [ |
| 66 |
|
'items' => Wishlist::countItems($user_id, $wishlist_ids), |
| 67 |
|
'isSuccess' => true, |
|
@@ 70-72 (lines=3) @@
|
| 67 |
|
'isSuccess' => true, |
| 68 |
|
]; |
| 69 |
|
} else { |
| 70 |
|
if (null !== $wishlist = Wishlist::createWishlist(Yii::$app->request->post('title'), $user_id, $wishlist_ids, false)) { |
| 71 |
|
$wishlist->addToWishlist($itemId); |
| 72 |
|
} |
| 73 |
|
return $result[] = [ |
| 74 |
|
'items' => Wishlist::countItems($user_id, $wishlist_ids), |
| 75 |
|
'isSuccess' => true, |