fix: update Invite model, backup rules, and Firestore security rules
This commit is contained in:
parent
a870b17801
commit
e42de938e7
|
|
@ -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
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -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() }
|
||||||
|
|
|
||||||
|
|
@ -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>
|
||||||
|
|
|
||||||
|
|
@ -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>
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue