Skip to content

Commit

Permalink
fix: wrong profile input (#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
Buffett111 authored Dec 25, 2024
1 parent bd106a8 commit 5959c9a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/lib/utils/getUser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export function getUser(uid: string): Promise<Profile> {
bio: null
};
}
console.log(`取得使用者資料: ${JSON.stringify(data)}`);
return ProfileSchema.omit({ updatedAt: true, createdAt: true }).parse(data);
})();
cache.set(uid, user);
Expand Down
2 changes: 2 additions & 0 deletions src/routes/api/auth/signin/+server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ export const POST: RequestHandler = async ({ request, cookies }) => {
uid,
displayName: user.displayName || 'User',
email: user.email || '',
title: '',
bio: '',
createdAt: FieldValue.serverTimestamp(),
updatedAt: FieldValue.serverTimestamp()
};
Expand Down

0 comments on commit 5959c9a

Please sign in to comment.