Skip to content

PATCH to /team/:id/members/:user fails when used with username rather than ID  #2568

@brawaru

Description

@brawaru

Describe the bug

According to the documentation, the PATCH team/:id/members/:user endpoint should accept both the user ID and username for the :user pathname parameter 1. However, when called with the username, the endpoint will return 401 (Unauthorized) with the error message telling that the current user has no permissions to edit the team, despite being a literal owner of the project.

Steps to reproduce

  1. Send a PATCH request to team/:id/members/:user with the username as a :user pathname parameter.

Expected behavior

The response succeeds and the member gets changed, just like it does when the user ID used instead.

Additional context

N/A

Footnotes

  1. https://docs.modrinth.com/#tag/teams/operation/modifyTeamMember

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendInvolves work from the backend team

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions