Edit app-9xzmfic2e4g1/src/db/api.ts via Editor
This commit is contained in:
parent
7faea1370f
commit
f00876fc81
@ -14,6 +14,8 @@ export interface Place {
|
||||
start_time: string;
|
||||
end_time: string;
|
||||
notes?: string;
|
||||
personal_tip?: string;
|
||||
why_visit?: string;
|
||||
}
|
||||
|
||||
export interface ItineraryDay {
|
||||
@ -22,6 +24,7 @@ export interface ItineraryDay {
|
||||
total_distance?: string;
|
||||
total_duration?: string;
|
||||
notes?: string;
|
||||
day_story?: string;
|
||||
}
|
||||
|
||||
export interface Trip {
|
||||
@ -120,14 +123,6 @@ const api = {
|
||||
return data;
|
||||
},
|
||||
|
||||
async getPlaceDetails(params: { place_id: string; name: string; category: string }) {
|
||||
const { data, error } = await supabase.functions.invoke('get-place-details', {
|
||||
body: params,
|
||||
});
|
||||
if (error) throw error;
|
||||
return data;
|
||||
},
|
||||
|
||||
getPhotoUrl(photoReference: string) {
|
||||
const { data } = supabase.storage.from('dummy').getPublicUrl('dummy'); // Just to get the base URL
|
||||
const baseUrl = data.publicUrl.split('/storage/v1')[0];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user