feat: refacto users endpoints#80
Open
Quentintnrl wants to merge 18 commits into
Open
Conversation
for permissions and rights
MathTek
approved these changes
May 21, 2026
CarolinHugo
approved these changes
May 21, 2026
There was a problem hiding this comment.
Pull request overview
Refactors the v1 “user” API surface by replacing the legacy /user/{user_id}/about endpoint with dedicated /user/me and /user/{id} endpoints, backed by new get_user_by_id and patch_user database queries, and aligns Auth OpenAPI tags.
Changes:
- Replaced
/user/{user_id}/aboutwith/user/me(GET/PATCH) and/user/{id}(GET) endpoints. - Added
get_user_by_idandpatch_userdatabase modules to support the new endpoints. - Updated OpenAPI tags for auth endpoints from
AuthtoAuthentication.
Reviewed changes
Copilot reviewed 32 out of 32 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| src/endpoints/v1/user/mod.rs | Rewires /user routing to new me and id sub-scopes. |
| src/endpoints/v1/user/me/mod.rs | Adds /user/me scope wiring. |
| src/endpoints/v1/user/me/get/endpoint.rs | Implements GET /user/me. |
| src/endpoints/v1/user/me/get/view.rs | Defines response model for GET /user/me. |
| src/endpoints/v1/user/me/get/mod.rs | Exposes GET /user/me modules. |
| src/endpoints/v1/user/me/patch/endpoint.rs | Implements PATCH /user/me. |
| src/endpoints/v1/user/me/patch/view.rs | Defines request model for PATCH /user/me. |
| src/endpoints/v1/user/me/patch/mod.rs | Exposes PATCH /user/me modules. |
| src/endpoints/v1/user/me/doc.rs | Adds OpenAPI doc nesting for /user/me. |
| src/endpoints/v1/user/id/mod.rs | Adds /user/{id} scope wiring. |
| src/endpoints/v1/user/id/get/endpoint.rs | Implements GET /user/{id}. |
| src/endpoints/v1/user/id/get/view.rs | Defines response model for GET /user/{id}. |
| src/endpoints/v1/user/id/get/mod.rs | Exposes GET /user/{id} modules. |
| src/endpoints/v1/user/id/doc.rs | Adds OpenAPI doc for /user/{id}. |
| src/endpoints/v1/user/doc.rs | Updates user OpenAPI nesting to /me and /{id}. |
| src/endpoints/v1/user/about/mod.rs | Removes legacy “about” endpoint module. |
| src/endpoints/v1/user/about/endpoint.rs | Removes legacy GET /user/{user_id}/about implementation. |
| src/endpoints/v1/user/about/doc.rs | Removes legacy “about” OpenAPI doc. |
| src/endpoints/v1/user/about/about_request_view.rs | Removes legacy request/path view types for “about”. |
| src/endpoints/v1/auth/reset_password/endpoint.rs | Renames OpenAPI tag to Authentication. |
| src/endpoints/v1/auth/forgot_password/endpoint.rs | Renames OpenAPI tag to Authentication. |
| src/endpoints/v1/auth/force_change_password/endpoint.rs | Renames OpenAPI tag to Authentication. |
| src/database/users/mod.rs | Switches exported user DB modules to get_user_by_id and patch_user. |
| src/database/users/get_user_by_id/mod.rs | Adds module exports for the “get by id” query/view. |
| src/database/users/get_user_by_id/query.rs | Implements “get user by id” DB query. |
| src/database/users/get_user_by_id/view.rs | Adds query view + result view for “get user by id”. |
| src/database/users/patch_user/mod.rs | Adds module exports for the “patch user” query/view. |
| src/database/users/patch_user/query.rs | Implements partial UPDATE query builder for users. |
| src/database/users/patch_user/view.rs | Adds patch query view used by patch_user_query. |
| src/database/users/about/mod.rs | Removes legacy “about” DB module. |
| src/database/users/about/view.rs | Removes legacy “about” DB view. |
| src/database/auth/change_password/view.rs | Removes an unrelated duplicated login result view from this module. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.