Skip to content

feat: add GET /api/v1/user/me endpoint / ログイン中ユーザー取得APIの追加#544

Merged
zigzagdev merged 3 commits into
feat/userfrom
feat-user-me-api
Jul 20, 2026
Merged

feat: add GET /api/v1/user/me endpoint / ログイン中ユーザー取得APIの追加#544
zigzagdev merged 3 commits into
feat/userfrom
feat-user-me-api

Conversation

@zigzagdev

Copy link
Copy Markdown
Owner

Motivation / 目的

AuthController::login のレスポンスはトークンのみでユーザーのidを返さないため、フロントエンドはログイン後に「自分自身」の情報を取得する手段を持っていなかった。これがマイページ表示ができない一因だった (#542)。

The login response only returns a token, never the user's id, so the frontend had no way to fetch "its own" user data after logging in. This was one of the causes preventing mypage from displaying (#542).

Closes #542

What I have done / 実施内容

Test Results / テスト結果

  • test_me_returns_200_with_authenticated_user_when_authenticated
  • test_me_returns_401_when_unauthenticated
  • test_me_returns_500_on_unexpected_error
  • 既存の LoginTest / LogoutTest の回帰なしを確認済み

@codecov

codecov Bot commented Jul 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.80519% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 62.51%. Comparing base (0ea56e1) to head (3af3152).

Files with missing lines Patch % Lines
...pp/Packages/Features/Controller/AuthController.php 80.00% 4 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff               @@
##             feat/user     #544      +/-   ##
===============================================
+ Coverage        62.21%   62.51%   +0.30%     
- Complexity        1604     1615      +11     
===============================================
  Files              135      136       +1     
  Lines             8252     8329      +77     
===============================================
+ Hits              5134     5207      +73     
- Misses            3118     3122       +4     
Files with missing lines Coverage Δ
src/app/Packages/Features/Tests/MeTest.php 100.00% <100.00%> (ø)
...pp/Packages/Features/Controller/AuthController.php 93.22% <80.00%> (-6.78%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@zigzagdev
zigzagdev merged commit 05bab68 into feat/user Jul 20, 2026
28 checks passed
@zigzagdev zigzagdev self-assigned this Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Add GET /v1/user/me endpoint to fetch the authenticated user / ログイン中ユーザー自身の情報を取得するAPIの追加

1 participant