Skip to content

Commit

Permalink
Fix JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan-Papa committed Oct 15, 2024
1 parent bad1620 commit d4293ac
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions backend/src/pages/api/user/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ export default APIWrapper({
const annualPetVisitDay: Date = req.body.annualPetVisitDay as Date;

const dbUser = await findUserByFirebaseUid(firebaseUid);

if (dbUser) {
throw new Error("User already exists in database!");
}
Expand All @@ -73,10 +72,10 @@ export default APIWrapper({
throw new Error("Failed to create user!");
} else {
const emailData = {
"email": email,
"address": address ? address : "N/A",
"firstName": firstName ? firstName : "N/A",
"lastName": lastName ? lastName : "N/A",
email: email,
address: address ? address : "N/A",
firstName: firstName ? firstName : "N/A",
lastName: lastName ? lastName : "N/A",
};
await sendEmail(
"[email protected]",
Expand Down

0 comments on commit d4293ac

Please sign in to comment.