You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
886B

  1. <?php
  2. namespace App\Http\Controllers\Web\Auth;
  3. use App\Exceptions\AppCommonException;
  4. use App\Http\Controllers\Web\WebController;
  5. use App\Kintone\Models\Customer;
  6. use Illuminate\Http\JsonResponse;
  7. use Illuminate\Http\Request;
  8. use Illuminate\Support\Facades\Auth;
  9. class MeController extends WebController
  10. {
  11. use Me;
  12. public function name(): string
  13. {
  14. return "ログインユーザー情報の参照";
  15. }
  16. public function description(): string
  17. {
  18. return "ログインユーザー情報を取得する";
  19. }
  20. public function __construct(protected MeParam $param)
  21. {
  22. parent::__construct();
  23. }
  24. protected function run(Request $request): JsonResponse
  25. {
  26. try {
  27. return $this->successResponse($this->me());
  28. } catch (AppCommonException) {
  29. return $this->failedResponse();
  30. }
  31. }
  32. }