Implement role sync API endpoint using existing role mapping system#377
Implement role sync API endpoint using existing role mapping system#377XboxBedrock with Copilot wants to merge 8 commits into
Conversation
Co-authored-by: XboxBedrock <68715625+XboxBedrock@users.noreply.github.com>
Co-authored-by: XboxBedrock <68715625+XboxBedrock@users.noreply.github.com>
Co-authored-by: XboxBedrock <68715625+XboxBedrock@users.noreply.github.com>
|
@copilot please change the way the whitelist works: |
Co-authored-by: Nudelsuppe42 <67996941+Nudelsuppe42@users.noreply.github.com>
Changed to key-based whitelist system. The API now accepts role keys (e.g., "buildteam_owner") instead of role IDs. Each key maps to both main and staff Discord role IDs in the config, and either can be undefined. The bot applies roles to both servers where configured. Commit: 55834d6 |
|
Hey @copilot , I already have a system for for role handling. main-bot/src/util/roles.util.ts Line 15 in 7bfb189 You can also look around and you will find JSON5 files in config that already do role mapping, with the guild ID as the file name. I would much rather you work with these than create your own mapping. |
Co-authored-by: XboxBedrock <68715625+XboxBedrock@users.noreply.github.com>
Refactored to use the existing |
|
Can you rebase to current code version |
|
@copilot Can you rebase to current code version, also one thing you should know is that the code already loads the roles, so you can just use those from the array. The array of roles is in client |
…ading Co-authored-by: XboxBedrock <68715625+XboxBedrock@users.noreply.github.com>
Branch is already up to date with the base code. Updated to use |
|
@XboxBedrock Reminder to go through, edit this, and then merge tmrw |
|
@copilot add swagger documentation |
Co-authored-by: XboxBedrock <68715625+XboxBedrock@users.noreply.github.com>
Implementation Plan for Role Sync with Whitelist
/api/v1/role/:idendpoint inrole.controller.tsto:add: trueis in the bodyadd: falseis in the bodySummary
Fixed swagger documentation to correctly reflect the API implementation.
Key Changes (Latest Update):
/api/v1/roleto/api/v1/role/{id}to match controller implementationidparameter from "query" to "path" for GET endpointSwagger Documentation Now Correctly Shows:
/api/v1/role/{id}- Get user's roles (path parameter)/api/v1/role/{id}- Add/remove roles (path parameter)Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.