Added API
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user