Skip to content

Commit

Permalink
Fix deploy preview?
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan-Papa committed Oct 14, 2024
1 parent bb6d676 commit cca20a2
Show file tree
Hide file tree
Showing 7 changed files with 20,977 additions and 1,182 deletions.
18,123 changes: 18,123 additions & 0 deletions backend/package-lock.json

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions backend/src/pages/api/user/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export default APIWrapper({
requireEmailVerified: false,
},
handler: async (req) => {
console.log("POST /api/user/user");

Check warning on line 35 in backend/src/pages/api/user/user.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected console statement
const email: string = req.body.email as string;
const birthday: Date = req.body.birthday as Date;
const firebaseUid: string = req.body.firebaseUid as string;
Expand All @@ -41,12 +42,15 @@ export default APIWrapper({
const profileImage: string = req.body.profileImage as string;
const address: string = req.body.address as string;
const annualPetVisitDay: Date = req.body.annualPetVisitDay as Date;
console.log("email", email);

const dbUser = await findUserByFirebaseUid(firebaseUid);
if (dbUser) {
throw new Error("User already exists in database!");
}

console.log("dbUser passed");

const roles = [Role.NONPROFIT_USER];
const isAdmin = email.endsWith("@healing4heroes.org");
if (isAdmin) {
Expand Down
Loading

0 comments on commit cca20a2

Please sign in to comment.