Fix playlist music style preference
This commit is contained in:
@@ -3,25 +3,18 @@ const supabaseKey = "sb_publishable_fazCCLmO7XjtryY28ePR-A_CS7aU6fF";
|
|||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
try {
|
try {
|
||||||
const res = await fetch(`${supabaseUrl}/rest/v1/trips`, {
|
const res = await fetch(`${supabaseUrl}/rest/v1/profiles?limit=1`, {
|
||||||
method: "POST",
|
method: "GET",
|
||||||
headers: {
|
headers: {
|
||||||
apikey: supabaseKey,
|
apikey: supabaseKey,
|
||||||
Authorization: `Bearer ${supabaseKey}`,
|
Authorization: `Bearer ${supabaseKey}`,
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json"
|
||||||
Prefer: "return=representation"
|
}
|
||||||
},
|
|
||||||
body: JSON.stringify({
|
|
||||||
title: "Test Trip",
|
|
||||||
origin: "Lisbon",
|
|
||||||
destination: "Porto",
|
|
||||||
waypoints: []
|
|
||||||
})
|
|
||||||
});
|
});
|
||||||
const data = await res.json();
|
const data = await res.json();
|
||||||
console.log("INSERT_RESPONSE:", JSON.stringify(data, null, 2));
|
console.log("PROFILES_QUERY_RESPONSE:", JSON.stringify(data, null, 2));
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error("Error inserting:", err);
|
console.error("Error querying profiles:", err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user