Skip to content

v2.12.1 - #28

Open
Gwilhoa wants to merge 4 commits into
releasefrom
develop
Open

v2.12.1#28
Gwilhoa wants to merge 4 commits into
releasefrom
develop

Conversation

@Gwilhoa

@Gwilhoa Gwilhoa commented Jan 29, 2026

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings January 29, 2026 09:18

Copilot AI left a comment

Copy link
Copy Markdown

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 bumps the version to 2.12.1 and includes several bug fixes and improvements, along with an upgrade of the discord.js library from 14.14.1 to 14.25.1.

Changes:

  • Fixed a critical bug in auth.service.ts where the userInAuth array was not being properly cleaned up due to using filter() instead of splice()
  • Improved the getAllMembers function to properly validate that all guild members are cached before returning the cache
  • Changed the HTTP method for updating user roles from POST to PUT (breaking API change)

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
package.json Version bumped to 2.12.1 and discord.js upgraded from 14.14.1 to 14.25.1
package-lock.json Dependency lockfile updated to reflect discord.js upgrade and transitive dependency updates
src/services/discord.service.ts Fixed getAllMembers cache validation logic and added explicit return type; added Collection import
src/services/auth.service.ts Fixed bug where userInAuth array wasn't properly cleaned up by replacing filter() with splice()
src/routes/roles/users/me/index.ts Changed HTTP method from POST to PUT for the updateMyRoles endpoint

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


router.get("/", getJwtRequired, runAsyncWrapper(getMyRoles));
router.post("/", getJwtRequired, runAsyncWrapper(updateMyRoles));
router.put("/", getJwtRequired, runAsyncWrapper(updateMyRoles));

Copilot AI Jan 29, 2026

Copy link

Choose a reason for hiding this comment

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

Changing the HTTP method from POST to PUT is a breaking change for API clients. This will cause any existing clients using POST to fail with a 404 error. Consider:

  1. Keeping both methods temporarily for backward compatibility
  2. Documenting this breaking change in release notes
  3. Coordinating with frontend/client teams before deployment

The change itself is semantically correct since the endpoint updates resources (PUT is more appropriate than POST for updates), but it requires careful migration planning.

Suggested change
router.put("/", getJwtRequired, runAsyncWrapper(updateMyRoles));
router.put("/", getJwtRequired, runAsyncWrapper(updateMyRoles));
router.post("/", getJwtRequired, runAsyncWrapper(updateMyRoles));

Copilot uses AI. Check for mistakes.
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.

2 participants