Skip to content

Commit

Permalink
prettier applied
Browse files Browse the repository at this point in the history
  • Loading branch information
Shock@5678 committed Aug 21, 2024
1 parent bb8431f commit 1592718
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions graphql/resolvers.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,7 @@ const resolvers = {
},

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

console.log('coming here');
console.log("coming here");
const { name, email } = userInput;
let user = await User.findOne({ email });

Expand All @@ -210,13 +209,12 @@ const resolvers = {
},

login: async (_parent, { id, credentials }) => {

console.log(credentials)
console.log(credentials);

if (!id && !credentials) return new UserInputError("One of ID and credentials required");

const { email, password } = credentials || {}; // unpack if available
console.log(email, password)
console.log(email, password);
const user = id ? await User.findById(id) : await User.findOne({ email });

if (!user) return new Error("User not found.");
Expand Down Expand Up @@ -709,7 +707,6 @@ const resolvers = {
}
),
},

},
}),
};
Expand Down

0 comments on commit 1592718

Please sign in to comment.