create scripts for guestbook
create script for adding comment create script for listing comments will need to wire up with webpage
This commit is contained in:
parent
6ad3bc0cfd
commit
2a3401074d
12
src/scripts/guestbook-list-comments.js
Normal file
12
src/scripts/guestbook-list-comments.js
Normal file
@ -0,0 +1,12 @@
|
||||
import { createClient } from "@supabase/supabase-js";
|
||||
|
||||
// Create a single supabase client for interacting with your database
|
||||
const supabase = createClient(
|
||||
"https://kddqzqkvjumaslnljhqv.supabase.co",
|
||||
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtkZHF6cWt2anVtYXNsbmxqaHF2Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NDAyMDM5NTEsImV4cCI6MjA1NTc3OTk1MX0.wXhRoE7Jh2aaCdPlBiqEI7F4yj8-7beoeWEPvtVn0kg"
|
||||
);
|
||||
|
||||
const { data, error } = await supabase
|
||||
.from("guestbook-comments")
|
||||
.select()
|
||||
.eq("approved", true);
|
@ -10,5 +10,5 @@ const { error } = await supabase.from("guestbook-comments").insert({
|
||||
name: "emma",
|
||||
website: "https://emmas.place",
|
||||
comment: "lmao",
|
||||
"bot-check": 38,
|
||||
"bot-check": 17,
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user