-
Notifications
You must be signed in to change notification settings - Fork 16
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: Items not being fetched with a user that is not a manager of a TP #494
Conversation
src/Item/Item.service.ts
Outdated
} | ||
|
||
const thirdPartyIds = thirdParties.map((thirdParty) => thirdParty.id) | ||
const thirdPartyIds = thirdParties.map((thirdParty: any) => thirdParty.id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why any here :( ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I forgot to delete it, it was for testing purposes.
@@ -54,7 +54,6 @@ export const thirdPartyFragment = () => gql` | |||
root | |||
managers | |||
maxItems | |||
totalItems |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we remove it from ThirdPartyFragment too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do! Great catch!
Pull Request Test Coverage Report for Build 2163495409
💛 - Coveralls |
This PR fixes an issue that occurred when requesting the items of a user that wasn't a manager of a third party. The endpoint was returning
[]
for those cases.