Skip to content
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

Title: Resolved issue with Beacon leader being null #375

Closed
wants to merge 2 commits into from

Conversation

RunTerror
Copy link
Collaborator

Changes Made:

  1. Modified the resolver for the group query.
  2. Also, populated the leader field of beacons inside the group.
Screenshot 2024-02-08 at 12 49 27

#374

@RunTerror
Copy link
Collaborator Author

@aadibajpai Please review my pr

if (group.leader.id !== user.id && !group.members.includes(user))
return new Error("User should be a part of the group");
return group;
const group = await Group.findById(id).populate('leader members').populate({
Copy link
Member

Choose a reason for hiding this comment

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

looks good, need to review the rest

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hi @aadibajpai, I'm actively addressing the issue. Additionally, I'm proposing a new feature that allows leaders to toggle between displaying their name or remaining anonymous on the beacon. So i want to close this pr for now soon i'll complete proposed feature and create a new pr.

const userObj = await newUser.save();
return userObj;
},

oAuth: async (_parent, { userInput }) => {
Copy link
Member

Choose a reason for hiding this comment

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

what is this for

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

using this function for google and oAuth signup, userInput will come from frontend through flutter libraries and then some operations are performed.

for oAuth i have created this Closes #373

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