Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
shafu0x committed Oct 15, 2022
1 parent b21b644 commit 0513f6b
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions app.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createClient } from "@supabase/supabase-js";

const N_NFTS = 10;
const N_NFTS = 100;

// Create a single supabase client for interacting with your database
const supabase = createClient(
Expand All @@ -9,15 +9,14 @@ const supabase = createClient(
);

async function setUpNftTable() {
// If row exists it will not be overwritten!
var rows = [];
for (let i = 0; i < N_NFTS; i++) {
rows.push({ index: i });
}
const { error } = await supabase.from("nfts").insert(rows);
const { error } = await supabase.from("nfts").upsert(rows);
console.log(error);
}

const { data, error } = await supabase.from("nfts").select();

console.log(data);

console.log(333);
setUpNftTable();

0 comments on commit 0513f6b

Please sign in to comment.