a tool for shared writing and social publishing

Create db connection everywhere necessary

authored by awarm.space and committed by

GitHub e6675216 800cea26

+3
+3
appview/index.ts
··· 144 144 }); 145 145 if (error && error.code === "23503") { 146 146 console.log("creating identity"); 147 + let client = new Client({ connectionString: process.env.DB_URL }); 148 + let db = drizzle(client); 147 149 await createIdentity(db, { atp_did: evt.did }); 150 + client.end(); 148 151 await supabase.from("publication_subscriptions").upsert({ 149 152 uri: evt.uri.toString(), 150 153 identity: evt.did,