Skip to content

feat: refacto users endpoints#80

Open
Quentintnrl wants to merge 18 commits into
mair-69-refacto-authfrom
mair-44-refacto-users-endpoints
Open

feat: refacto users endpoints#80
Quentintnrl wants to merge 18 commits into
mair-69-refacto-authfrom
mair-44-refacto-users-endpoints

Conversation

@Quentintnrl
Copy link
Copy Markdown
Contributor

No description provided.

@Quentintnrl Quentintnrl self-assigned this May 21, 2026
Copilot AI review requested due to automatic review settings May 21, 2026 10:30
@Quentintnrl Quentintnrl linked an issue May 21, 2026 that may be closed by this pull request
@Quentintnrl Quentintnrl changed the base branch from main to mair-69-refacto-auth May 21, 2026 10:30
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

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}/about with /user/me (GET/PATCH) and /user/{id} (GET) endpoints.
  • Added get_user_by_id and patch_user database modules to support the new endpoints.
  • Updated OpenAPI tags for auth endpoints from Auth to Authentication.

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.

Comment thread src/database/users/patch_user/view.rs
Comment thread src/database/users/patch_user/view.rs
Comment thread src/endpoints/v1/user/id/get/endpoint.rs
Comment thread src/endpoints/v1/user/id/get/endpoint.rs
Comment thread src/endpoints/v1/user/me/get/endpoint.rs
Comment thread src/endpoints/v1/user/me/get/endpoint.rs
Comment thread src/endpoints/v1/user/id/doc.rs
Comment thread src/database/users/patch_user/query.rs
Comment thread src/endpoints/v1/user/id/get/endpoint.rs
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.

MAIR-44 refacto users endpoints

4 participants