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

Fix POST voyages/teams/{teamId}/techs bug #229

Merged
merged 14 commits into from
Jan 7, 2025
Merged

Conversation

JoshuaHinman
Copy link
Contributor

Description

This PR fixes a bug in which a user can create a new tech for a category that doesn't belong to their team.

Issue link

Fixes # 86b2n3gbr

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature updates / changes
  • Tests
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

yarn test

In swagger, verified that creating a tech within another team's category throws an error:

  • login as [email protected]
  • create tech with teamId: 1, techCategoryId: 51, "voyageTeamMemberId": 1

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have updated the change log

@JoshuaHinman JoshuaHinman self-assigned this Dec 7, 2024
src/techs/techs.service.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@andram11 andram11 left a comment

Choose a reason for hiding this comment

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

I think that techs.e2e-spec test should also be updated with a test case for this scenario

src/ability/conditions/voyage-teams.ability.ts Outdated Show resolved Hide resolved
src/ability/conditions/voyage-teams.ability.ts Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
andram11
andram11 previously approved these changes Dec 13, 2024
@cherylli
Copy link
Contributor

@JoshuaHinman could you please resolve merge conflicts when you have a chance? Thanks!

@Ajen07 Ajen07 self-requested a review December 22, 2024 08:17
Copy link
Contributor

@cherylli cherylli left a comment

Choose a reason for hiding this comment

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

Got a failed test probably merge error
image

Everything else works

Ajen07
Ajen07 previously approved these changes Dec 22, 2024
Copy link
Contributor

@Ajen07 Ajen07 left a comment

Choose a reason for hiding this comment

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

Tested the changes in Swagger, the issue has been resolved, and all tests have successfully passed.

andram11
andram11 previously approved these changes Dec 28, 2024
@JoshuaHinman JoshuaHinman dismissed stale reviews from andram11 and Ajen07 via 16d4a9e January 4, 2025 03:30
Copy link
Contributor

@cherylli cherylli left a comment

Choose a reason for hiding this comment

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

I will fix the changelog when I merge my latest PR, too many different changelog versions now 😂

@JoshuaHinman JoshuaHinman merged commit 17ed731 into dev Jan 7, 2025
1 check passed
@JoshuaHinman JoshuaHinman deleted the fix-post-new-tech branch January 7, 2025 03:35
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.

4 participants