DeedFriendService.php 859 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace App\Http\Services\V1;
  3. use App\Generated\V1\Messages\DeedFriend\StarFriendMessage;
  4. use App\Generated\V1\Messages\DeedFriend\HideFriendMessage;
  5. use App\Managers\DeedFriendManager;
  6. use App\Http\Controllers\Core\Auth;
  7. class DeedFriendService
  8. {
  9. protected $deedFriendManager;
  10. public function __construct(DeedFriendManager $deedFriendManager)
  11. {
  12. $this->deedFriendManager = $deedFriendManager;
  13. }
  14. public function starFriend(StarFriendMessage $message)
  15. {
  16. $friendUid = $message->getFriendUid();
  17. $uid = Auth::auth();
  18. $this->deedFriendManager->starFriend($uid, $friendUid);
  19. }
  20. public function hideFriend(HideFriendMessage $message)
  21. {
  22. $friendUid = $message->getFriendUid();
  23. $uid = Auth::auth();
  24. $this->deedFriendManager->hideFriend($uid, $friendUid);
  25. }
  26. }