// wakti-studio / votre-projet / api / route.ts
// Exemple : endpoint GPS temps réel
export async function GET() {
const { data } = await supabase
.from('positions')
.select('*')
.eq('status', 'active')
.order('updated_at', { ascending: false })
return Response.json({
vehicles: data,
count: data?.length ?? 0,
timestamp: new Date().toISOString()
})
}