Skip to content

chenges to add universal member to groups #53

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
merged 3 commits into from
Jun 13, 2020

Conversation

bountyC0d3r
Copy link
Collaborator

No description provided.

@bountyC0d3r bountyC0d3r requested a review from cwdcwd June 10, 2020 07:14
if (res && res.records.length === 0) {
res = await tx.run(`CREATE (user:User {id: {id}}) RETURN user`, { id })
if (res && res.records.length === 0) {
res = await tx.run(`CREATE (user:User {id: '00000000', universalUID: {id}}) RETURN user`, {id})
Copy link
Contributor

Choose a reason for hiding this comment

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

is the Id field not allowed to be null ?

res = await tx.run(`MATCH (e:${model} {id: {id}}) RETURN e`, {id})

if (res && res.records.length === 0) {
res = await tx.run(`CREATE (user:User {id: {id}, universalUID: '00000000'}) RETURN user`, {id})
Copy link
Contributor

Choose a reason for hiding this comment

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

can we put a null in instead of zeros?

Copy link
Contributor

@cwdcwd cwdcwd left a comment

Choose a reason for hiding this comment

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

Can we get the swagger updated as well?
I also want to add in fetching of the universal Id for a user when a normal TC member Id is used. I believe I need to add an endpoint to the U-Bahn API for this first though.
cc: @callmekatootie

@@ -107,9 +107,9 @@ async function addGroupMember(currentUser, groupId, data) {
oldId: data.oldId,
name: group.name,
createdAt,
...(currentUser === 'M2M' ? {} : { createdBy: currentUser.userId }),
...(currentUser === 'M2M' ? {} : {createdBy: currentUser.userId}),
memberId: data.memberId,
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we not using the M2M clientId for the createdUser/updatedUser values ?

membershipId,
membershipType: data.membershipType,
createdAt,
createdBy: currentUser === 'M2M' ? '00000000' : currentUser.userId
Copy link
Contributor

Choose a reason for hiding this comment

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

can we use null instead of zeros?

name: group.name,
createdAt,
...(currentUser === 'M2M' ? {} : {createdBy: currentUser.userId}),
memberId: '00000000',
Copy link
Contributor

Choose a reason for hiding this comment

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

nullable?

@bountyC0d3r bountyC0d3r merged commit 2711917 into develop Jun 13, 2020
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