Implement cross-device prayer synchronization
- Replace localStorage with Firestore for prayer persistence - Prayers now sync across all devices when logged in - Add userId to prayers for proper user association - Update archive/unarchive to work with Firestore - Update Firestore rules for user-specific prayer access - Remove localStorage dependencies
This commit is contained in:
1 parent
6b0713612d
commit
9f799397c8
3 files changed
+98
-45
No files matched your search
+5
-2
@@ -6,9 +6,12 @@ service cloud.firestore {
|
||||
allow read, write: if request.auth != null && request.auth.uid == userId;
|
||||
}
|
||||
|
||||
// Allow authenticated users to read/write prayers
|
||||
// Allow authenticated users to read/write their own prayers
|
||||
match /prayers/{prayerId} {
|
||||
allow read, write: if request.auth != null;
|
||||
allow read, write: if request.auth != null &&
|
||||
resource.data.userId == request.auth.uid;
|
||||
allow create: if request.auth != null &&
|
||||
request.resource.data.userId == request.auth.uid;
|
||||
}
|
||||
|
||||
// Allow server-side API access for scheduled emails (no auth required for GET)
|
||||
|
||||
Reference in new issue
Block a user