MemberDeviceBlockController.php 819 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace Themes\kbgolf\pro\app\Http\Controllers\Auth;
  3. use App\Services\CallApiService;
  4. class MemberDeviceBlockController
  5. {
  6. private $callApiService;
  7. public function __construct(CallApiService $callApiService)
  8. {
  9. $this->callApiService = $callApiService;
  10. }
  11. public function store()
  12. {
  13. $response = $this->callApiService->callApi([
  14. 'url' => 'member-device-block',
  15. 'data' => [
  16. 'ResetCode' => request('code'),
  17. 'DeviceId' => (int)request('device_id'),
  18. ],
  19. ]);
  20. if (empty(request('code')) || $this->callApiService->verifyApiError($response)) {
  21. return redirect()->route('member-device-block-failed');
  22. }
  23. return redirect()->route('member-device-block-success');
  24. }
  25. }