8000 edited supabase upsert slightly · chriscarrollsmith/session-scribe@79140b5 · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Aug 19, 2024. It is now read-only.

Commit 79140b5

Browse files
edited supabase upsert slightly
1 parent 710a71e commit 79140b5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pages/api/supabaseUpsert.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ const supabase = createClient(supabaseUrl, supabaseKey);
99
//{
1010
// "body": {
1111
// "sessionName": "Your Session Name",
12+
// "presenters": "Your Presenters",
1213
// "transcriptText": "Your Transcript Text",
1314
// "audioFilePath": "Your File Path",
1415
// "pdfFilePath": "Your File Path"
@@ -22,13 +23,13 @@ export default async function supabaseUpsert(req, res) {
2223
const createdAt = new Date().toISOString();
2324

2425
// Get sessionName, transcriptText and filePath from req.body
25-
const { sessionName, transcriptText, filePath } = req.body;
26+
const { sessionName, presenters, transcriptText, filePath } = req.body;
2627

2728
try {
2829
const { data, error } = await supabase
2930
.from('transcripts')
3031
.insert([
31-
{ id: uniqueId, created_at: createdAt, session_name: sessionName, transcript: transcriptText, file_path: filePath },
32+
{ id: uniqueId, created_at: createdAt, session_name: sessionName, presenters: presenters, transcript: transcriptText, file_path: filePath },
3233
])
3334
.select();
3435

0 commit comments

Comments
 (0)
0