ShareController.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?php
  2. namespace App\Generated\Controllers\V1;
  3. use App\Http\Services\V1\ShareService;
  4. use App\Generated\V1\Messages\Share\LikeMeMessage;
  5. use App\Generated\V1\Messages\Share\PairGetMessage;
  6. use App\Generated\V1\Messages\Share\LikeMeHistoryMessage;
  7. use App\Http\Controllers\Controller;
  8. use App\Generated\V1\Messages\Share\PairVipCheckMessage;
  9. use DB;
  10. use App\Generated\V1\Messages\Share\LikeMeCheckMessage;
  11. class ShareController extends Controller
  12. {
  13. public $handler;
  14. public function __construct(ShareService $handler)
  15. {
  16. $this->handler = $handler;
  17. }
  18. public function likeMeHistory(LikeMeHistoryMessage $message)
  19. {
  20. $message->validateInput();
  21. $this->handler->likeMeHistory($message);
  22. $message->validateOutput();
  23. return $message->getResponse();
  24. }
  25. public function likeMeCheck(LikeMeCheckMessage $message)
  26. {
  27. $message->validateInput();
  28. $this->handler->likeMeCheck($message);
  29. $message->validateOutput();
  30. return $message->getResponse();
  31. }
  32. public function likeMe(LikeMeMessage $message)
  33. {
  34. $message->validateInput();
  35. $this->handler->likeMe($message);
  36. $message->validateOutput();
  37. return $message->getResponse();
  38. }
  39. public function pairVipCheck(PairVipCheckMessage $message)
  40. {
  41. $message->validateInput();
  42. $this->handler->pairVipCheck($message);
  43. $message->validateOutput();
  44. return $message->getResponse();
  45. }
  46. public function pairGet(PairGetMessage $message)
  47. {
  48. $message->validateInput();
  49. $this->handler->pairGet($message);
  50. $message->validateOutput();
  51. return $message->getResponse();
  52. }
  53. }