Skip to content

Commit 04badde

Browse files
committed
fix: add streakStart to updateDoc
1 parent 3dece57 commit 04badde

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/utils/firebase.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,7 @@ export const updateStreakStart = async (userId: string, startDate: Date) => {
327327

328328
await updateDoc(userRef, {
329329
streakDays: diffInDays > 0 ? diffInDays : 0, // Ensure streakDays is not negative
330+
streakStart: Timestamp.fromDate(startDate)
330331
});
331332

332333
return { success: true, message: 'Streak start updated successfully' };

0 commit comments

Comments
 (0)