mirror of
https://github.com/jjbrunton/Sauci.git
synced 2026-10-31 18:19:43 +00:00
Update
This commit is contained in:
1 parent
b10eae1bf3
commit
a15089f607
20 files changed
+3566
-3654
No files matched your search
@@ -85,8 +85,10 @@ export default function PairingScreen() {
|
||||
};
|
||||
|
||||
const handleJoinCouple = async () => {
|
||||
if (inviteCode.length < 8) {
|
||||
Alert.alert("Error", "Please enter a valid invite code");
|
||||
// Validate invite code format (8 alphanumeric characters)
|
||||
const sanitizedCode = inviteCode.trim().toUpperCase();
|
||||
if (!/^[A-Z0-9]{8}$/.test(sanitizedCode)) {
|
||||
Alert.alert("Error", "Please enter a valid 8-character invite code");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -100,7 +102,7 @@ export default function PairingScreen() {
|
||||
|
||||
const { data, error } = await supabase.functions.invoke("manage-couple", {
|
||||
method: "POST",
|
||||
body: { invite_code: inviteCode },
|
||||
body: { invite_code: sanitizedCode },
|
||||
});
|
||||
|
||||
if (error) throw error;
|
||||
|
||||
Reference in new issue
Block a user