mirror of
https://github.com/jjbrunton/Sauci.git
synced 2026-11-01 18:19:43 +00:00
feat(backend): add standalone data plane
Replace the Supabase application data plane with the Node/PostgreSQL API, migrate mobile, admin, web, and MCP callers, add controlled cutover tooling, and define hardened Dokploy infrastructure.
This commit is contained in:
1 parent
01bb8225ae
commit
006761d3b0
294 files changed
+16259
-6138
No files matched your search
@@ -1,8 +1,9 @@
|
||||
'use client'
|
||||
|
||||
import { useState } from 'react'
|
||||
import Link from 'next/link'
|
||||
import { ArrowLeft, Gift, Mail, Key, CheckCircle, AlertCircle, Loader2 } from 'lucide-react'
|
||||
import Link from 'next/link'
|
||||
import { ArrowLeft, Gift, Mail, Key, CheckCircle, AlertCircle, Loader2 } from 'lucide-react'
|
||||
import { redeemCode } from './redemptionApi'
|
||||
|
||||
export default function RedeemPage() {
|
||||
const [email, setEmail] = useState('')
|
||||
@@ -32,24 +33,10 @@ export default function RedeemPage() {
|
||||
return
|
||||
}
|
||||
|
||||
setIsLoading(true)
|
||||
|
||||
try {
|
||||
const response = await fetch(
|
||||
`${process.env.NEXT_PUBLIC_SUPABASE_URL}/functions/v1/redeem-code`,
|
||||
{
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: JSON.stringify({
|
||||
email: email.trim(),
|
||||
code: code.trim(),
|
||||
}),
|
||||
}
|
||||
)
|
||||
|
||||
const data = await response.json()
|
||||
setIsLoading(true)
|
||||
|
||||
try {
|
||||
const data = await redeemCode(email.trim(), code.trim())
|
||||
|
||||
if (data.success) {
|
||||
setIsRedeemed(true)
|
||||
|
||||
Reference in new issue
Block a user