Skip to content

Me returns informations of logged user + unit test#21

Merged
chloecasali merged 3 commits intomainfrom
20-me-returns-informations-of-logged-user
Nov 15, 2025
Merged

Me returns informations of logged user + unit test#21
chloecasali merged 3 commits intomainfrom
20-me-returns-informations-of-logged-user

Conversation

@chloecasali
Copy link
Copy Markdown
Owner

No description provided.

@chloecasali chloecasali linked an issue Nov 14, 2025 that may be closed by this pull request
@chloecasali chloecasali self-assigned this Nov 14, 2025
@chloecasali
Copy link
Copy Markdown
Owner Author

  • add doc on new routes

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a /me endpoint that returns information about the currently authenticated user, along with corresponding unit tests.

  • New MeController that returns user information (id, email, firstname, roles) for the logged-in user
  • API Platform route configuration added to the User entity for the /me endpoint
  • Unit test added to verify the endpoint returns correct user data

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/Controller/MeController.php New controller that returns current user information via the /me endpoint
src/Entity/User.php Adds API Platform route configuration for /me endpoint and imports MeController
tests/Unit/UserTest.php Adds test case validating that /me endpoint returns correct user data
tests/AuthDefaultTestCase.php Adds ME_ENDPOINT constant for use in tests

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

chloecasali and others added 2 commits November 14, 2025 22:37
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@chloecasali chloecasali merged commit 133759a into main Nov 15, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

/me returns informations of logged user

2 participants