-
Notifications
You must be signed in to change notification settings - Fork 55
feat: project member & invites endpoint with additional fields #414
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
feat: project member & invites endpoint with additional fields #414
Conversation
Added/updated following endpoints to get user information with additional data: 1. project member by id 2. list of all invites inside the project 3. authenticated user invite details
f849dd5
to
92c43a2
Compare
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.
Thanks for PR @dpkshrma.
Code looks good, but there is a couple of issues.
-
If I put some non-existent values to the
fields
list I guess them in response withnull
values. But if the field is not supported it should be ignored and I shouldn't get anything in the response for that field: -
It looks like fields that should come from the traits are never returned.
For example, I'm requesting project members and one of the user ispshah_manager
which hasphotoURL,
, but I getnull
in response:Even though, if I retrieve the traits of
pshah_manger
I can see it hasphotoURL
:The same thing with
workingHourStart,workingHourEnd,timeZone
. For example, I invite usermaxceem8
which has all of them defined in traits:But if I get a list of invitation with this user, I get null values for
workingHourStart,workingHourEnd,timeZone
: -
Endpoint for getting individual invite looks like don't return additional fields, and always returns
null
: -
Endpoint for getting an individual invite now return multiple duplicate records:
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.
Thanks for timely update @dpkshrma.
All the previous issues are fixed, only a few small issues left:
-
Endpoint for an individual invite return an
array
with one invite, though previously it returned one invite object:
now:
-
Endpoint for getting one member should return error 404 when a member is not found, the same way as we do in all other endpoints, for example https://github.com/topcoder-platform/tc-project-service/blob/dev/src/routes/phases/get.js#L20-L26
1. Return only single object for invite endpoint 2. Handle 404 error for get project member by id endpoint 3. Return only pending project member invites
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.
Thanks, @dpkshrma. All works great now.
Added/updated following endpoints to get user information with additional data: