Skip to content

Deprecate use of members API for invite modal in favor of invitations API

Problem

Currently when inviting someone to be a member in the invite modal, we make 2 calls to the API

  1. /members with invites that are to current users.
  2. /invitations with invites that are to emails(not current users).

Each endpoint responds differently when encountering an error.

This causes downstream issues in response codes and how errors are handled in the response.

  • invitations endpoint provides a json object with each email being a key in a hash.
  • members endpoint provides a json object with each user being an element of an array.

This isn't sustainable and will only cause more issues when trying to deal with errors in the display and also extending.

Solution

Edited by Doug Stull