Skip to content

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

Merged

Conversation

dpkshrma
Copy link

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

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
Copy link
Contributor

@maxceem maxceem left a 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.

  1. If I put some non-existent values to the fields list I guess them in response with null values. But if the field is not supported it should be ignored and I shouldn't get anything in the response for that field:

    image

  2. 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 is pshah_manager which has photoURL,, but I get null in response:

    image

    Even though, if I retrieve the traits of pshah_manger I can see it has photoURL:

    image

    The same thing with workingHourStart,workingHourEnd,timeZone. For example, I invite user maxceem8 which has all of them defined in traits:

    image

    But if I get a list of invitation with this user, I get null values for workingHourStart,workingHourEnd,timeZone:

    image

  3. Endpoint for getting individual invite looks like don't return additional fields, and always returns null:

    image

  4. Endpoint for getting an individual invite now return multiple duplicate records:

    image

Copy link
Contributor

@maxceem maxceem left a 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:

  1. Endpoint for an individual invite return an array with one invite, though previously it returned one invite object:
    now:
    image

    before:
    image

  2. 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
Copy link
Contributor

@maxceem maxceem left a 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.

@maxceem maxceem merged commit 78b969f into topcoder-platform:dev Dec 3, 2019
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.

2 participants