From a692f4ef87cb9a8012eb096d3aa34361b78ba3e4 Mon Sep 17 00:00:00 2001
From: Arshia <arshiapour@hotmail.co.uk>
Date: Sat, 20 Apr 2024 01:13:40 +0330
Subject: [PATCH] minor update.

---
 client/src/services/Dashboard/AirlineDashboard.ts  | 5 ++++-
 client/src/services/Dashboard/CustomerDashboard.ts | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/client/src/services/Dashboard/AirlineDashboard.ts b/client/src/services/Dashboard/AirlineDashboard.ts
index 81e6d63..37c9702 100644
--- a/client/src/services/Dashboard/AirlineDashboard.ts
+++ b/client/src/services/Dashboard/AirlineDashboard.ts
@@ -35,7 +35,10 @@ export async function GetAirlineDashboardData({request}: {request: Request}): Pr
   try {
     const id = getSearchParam(request.url, 'id');
     const result = await Api.get(`Flight?airlineId=${id}`, { withCredentials: true });
-    return result.data;
+    return {
+      type: 'airline',
+      flightList : result.data
+    };
   } catch (error) {
     throw error;
   }
diff --git a/client/src/services/Dashboard/CustomerDashboard.ts b/client/src/services/Dashboard/CustomerDashboard.ts
index 0394661..cff674c 100644
--- a/client/src/services/Dashboard/CustomerDashboard.ts
+++ b/client/src/services/Dashboard/CustomerDashboard.ts
@@ -31,7 +31,7 @@ export interface ICustomerDashboardData {
   flightsHistory: IFlight[];
 }
 
-export async function GetCustomerDashboardData(): Promise<ICustomerDashboardData> {
+export async function GetCustomerDashboardData({ request } : { request: Request }): Promise<ICustomerDashboardData> {
   try {
     const upcomingFlights = Api.get('', {withCredentials: true});
     const flightsHistory = Api.get('', {withCredentials: true});
-- 
GitLab