fix: update Invite model, backup rules, and Firestore security rules

This commit is contained in:
null 2026-06-16 19:44:28 -05:00
parent a870b17801
commit e42de938e7
5 changed files with 16 additions and 6 deletions

View File

@ -8,7 +8,7 @@ data class Invite(
val coupleId: String? = null, val coupleId: String? = null,
val status: String = "pending", val status: String = "pending",
val createdAt: Long = System.currentTimeMillis(), val createdAt: Long = System.currentTimeMillis(),
val expiresAt: Long = System.currentTimeMillis() + 7 * 24 * 60 * 60 * 1000L, val expiresAt: Long = System.currentTimeMillis() + 24 * 60 * 60 * 1000L,
val acceptedAt: Long? = null, val acceptedAt: Long? = null,
val acceptedByUserId: String? = null val acceptedByUserId: String? = null
) )

View File

@ -56,7 +56,7 @@ fun CreateProfileScreen(
val focusManager = LocalFocusManager.current val focusManager = LocalFocusManager.current
LaunchedEffect(state.success) { LaunchedEffect(state.success) {
if (state.success) onNavigate(AppRoute.CREATE_INVITE) if (state.success) onNavigate(AppRoute.HOME)
} }
LaunchedEffect(state.error) { LaunchedEffect(state.error) {
state.error?.let { snackbar.showSnackbar(it); viewModel.dismissError() } state.error?.let { snackbar.showSnackbar(it); viewModel.dismissError() }

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<full-backup-content> <full-backup-content>
<include domain="sharedpref" path="."/> <exclude domain="sharedpref" path="local_answers" />
<include domain="database" path="."/> <exclude domain="database" path="." />
</full-backup-content> </full-backup-content>

View File

@ -1,5 +1,11 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<data-extraction-rules> <data-extraction-rules>
<include domain="sharedpref" path="."/> <cloud-backup>
<include domain="database" path="."/> <exclude domain="sharedpref" path="local_answers" />
<exclude domain="database" path="." />
</cloud-backup>
<device-transfer>
<exclude domain="sharedpref" path="local_answers" />
<exclude domain="database" path="." />
</device-transfer>
</data-extraction-rules> </data-extraction-rules>

View File

@ -44,6 +44,10 @@ service cloud.firestore {
match /couples/{coupleId} { match /couples/{coupleId} {
allow read, write: if isCouplesMember(coupleId); allow read, write: if isCouplesMember(coupleId);
match /sessions/{sessionId} {
allow read, write: if isCouplesMember(coupleId);
}
// Question threads live under the couple document. // Question threads live under the couple document.
match /question_threads/{threadId} { match /question_threads/{threadId} {
allow read, write: if isCouplesMember(coupleId); allow read, write: if isCouplesMember(coupleId);