Skip to content

Conversation

hentrymartin
Copy link
Collaborator

What's in this PR?

  • Make source field optional in backend

.string()
.allow(null)
.default(INVITE_SOURCE.WORK_MANAGER)
.custom((value) => {

Choose a reason for hiding this comment

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

The custom function here is converting null to undefined. Consider explaining why this conversion is necessary, as it might affect how the source field is handled downstream. Ensure that this change aligns with the intended behavior of making the source optional.

source: Joi.string()
source: Joi
.string()
.valid(_.values(INVITE_STATUS))

Choose a reason for hiding this comment

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

The valid method is being used with INVITE_STATUS, but it seems like it should be used with INVITE_SOURCE instead, as source is expected to be a string representing the invite source. Please verify if this is the intended behavior.

source: Joi.string()
source: Joi
.string()
.valid(_.values(INVITE_SOURCE))

Choose a reason for hiding this comment

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

The change from INVITE_STATUS to INVITE_SOURCE seems to align with the pull request description of making the source field optional. However, ensure that INVITE_SOURCE is correctly defined and imported in this context, and that it contains the appropriate values for validation.

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.

1 participant