updated cards slightly, just need to pull on a remote
This commit is contained in:
@@ -16,10 +16,12 @@ serve(async (req) => {
|
||||
const supabase = createClient(Deno.env.get('SUPABASE_URL'), Deno.env.get('SUPABASE_ANON_KEY'))
|
||||
|
||||
const { email, name } = await req.json()
|
||||
if (!name || !email || !emailRegex.test(email)) throw new Error(
|
||||
if (!email || !emailRegex.test(email)) throw new Error(
|
||||
'Please provide a valid email address or name'
|
||||
)
|
||||
|
||||
const name = email.split('@')[0]
|
||||
|
||||
const { data, error } = await supabase
|
||||
.from('subscribers')
|
||||
.upsert({ name: name, email: email })
|
||||
|
||||
Reference in New Issue
Block a user