Added API

This commit is contained in:
2026-06-21 12:52:30 +10:00
parent 05ca994253
commit 5850c849d0
32 changed files with 248 additions and 107 deletions
+2 -3
View File
@@ -9,9 +9,8 @@ export function useFlights(url: string, departedOnly: boolean = false) {
onMounted(async () => {
try {
const response = await axios.get(url, {
params: departedOnly ? { departed_only: true } : {}
})
const requestUrl = departedOnly ? `${url}/departed` : url
const response = await axios.get(requestUrl)
flights.value = response.data
} finally {
flightsLoading.value = false