Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove overloading of /api/v1/teams endpoint #2345

Merged
merged 3 commits into from
Jun 27, 2023
Merged

Remove overloading of /api/v1/teams endpoint #2345

merged 3 commits into from
Jun 27, 2023

Conversation

knolleary
Copy link
Member

Description

The /api/v1/teams endpoint served two purposes:

  • If admin, return a paginated list of teams on the platform
  • If ?slug=<slug> is provided, provide details of the corresponding team - with the appropriate ACL checks

This overloading is not nice when it comes to documenting the API. This PR cleans things up by introducing a separate endpoint to get a team by its slug: /api/v1/teams/slug/:teamSlug.

Added unit test coverage of the new endpoint; the previous version was not explicitly covered.

Checklist

  • I have read the contribution guidelines
  • Suitable unit/system level tests have been added and they pass
  • Documentation has been updated
    • Upgrade instructions
    • Configuration details
    • Concepts
  • Changes flowforge.yml?
    • Issue/PR raised on flowforge/helm to update ConfigMap Template
    • Issue/PR raised on flowforge/CloudProject to update values for Staging/Production

Labels

  • Backport needed? -> add the backport label
  • Includes a DB migration? -> add the area:migration label

@knolleary knolleary requested a review from Pezmc June 27, 2023 09:40
Copy link
Contributor

@Pezmc Pezmc left a comment

Choose a reason for hiding this comment

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

Changes look good, I can't explain why that UI test failed, but I've restarted it.

@knolleary
Copy link
Member Author

The UI test failure can be recreated locally on this branch, but not on main. So this has definitely done something. I'm digging.

@knolleary knolleary merged commit e173cba into main Jun 27, 2023
4 checks passed
@knolleary knolleary deleted the team-slug-api branch June 27, 2023 15:12
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.

None yet

2 participants