Save current app progress

This commit is contained in:
2026-05-28 22:55:43 +01:00
parent 134789cee1
commit d85e327c07
5 changed files with 481 additions and 414 deletions

28
scratch_db_test.js Normal file
View File

@@ -0,0 +1,28 @@
const supabaseUrl = "https://qyvnryhskgmvgjajqqru.supabase.co";
const supabaseKey = "sb_publishable_fazCCLmO7XjtryY28ePR-A_CS7aU6fF";
async function run() {
try {
const res = await fetch(`${supabaseUrl}/rest/v1/trips`, {
method: "POST",
headers: {
apikey: supabaseKey,
Authorization: `Bearer ${supabaseKey}`,
"Content-Type": "application/json",
Prefer: "return=representation"
},
body: JSON.stringify({
title: "Test Trip",
origin: "Lisbon",
destination: "Porto",
waypoints: []
})
});
const data = await res.json();
console.log("INSERT_RESPONSE:", JSON.stringify(data, null, 2));
} catch (err) {
console.error("Error inserting:", err);
}
}
run();