Skip to content

Commit

Permalink
prettier applied
Browse files Browse the repository at this point in the history
  • Loading branch information
RunTerror committed Feb 15, 2024
1 parent 24d89cb commit 926e5ef
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
4 changes: 1 addition & 3 deletions graphql/resolvers.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ const resolvers = {
},

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

const { name, email } = userInput;
let user = await User.findOne({ email });

Expand All @@ -106,7 +105,6 @@ const resolvers = {
return token;
},


login: async (_parent, { id, credentials }) => {
if (!id && !credentials) return new UserInputError("One of ID and credentials required");

Expand All @@ -123,7 +121,7 @@ const resolvers = {
let anon = true;

if (credentials) {
const valid = (email === user.email && bcrypt.compare(password, user.password));
const valid = email === user.email && bcrypt.compare(password, user.password);
if (!valid) return new AuthenticationError("credentials don't match");
anon = false;
}
Expand Down
1 change: 0 additions & 1 deletion graphql/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ const typeDefs = gql`
hello: String
}
input oAuthInput {
email: String
name: String
Expand Down

0 comments on commit 926e5ef

Please sign in to comment.