From 4791dcb9faecc33cc9207dd8e4e62113a3a854d0 Mon Sep 17 00:00:00 2001 From: berlin-tzen Date: Mon, 20 Feb 2023 17:00:07 +0800 Subject: [PATCH] =?UTF-8?q?[WHAT]=20=E6=9F=A5=E8=A9=A2=E8=A8=82=E5=96=AEAP?= =?UTF-8?q?I=E9=96=8B=E7=99=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WebApp/Controllers/BookingController.cs | 42 ++----------------- 1 file changed, 3 insertions(+), 39 deletions(-) diff --git a/EuroTran/WebApp/Controllers/BookingController.cs b/EuroTran/WebApp/Controllers/BookingController.cs index d9db17c..e1211dd 100644 --- a/EuroTran/WebApp/Controllers/BookingController.cs +++ b/EuroTran/WebApp/Controllers/BookingController.cs @@ -56,8 +56,8 @@ namespace WebApp.Controllers /// [HttpGet] [SEApiSecurityFilter] - public HttpResponseMessage Bookings( - string Lang, + public HttpResponseMessage Bookings( + string Lang, string SubCategoryIDs, string BookingStatuses, string PaymentStatuses) @@ -69,41 +69,6 @@ namespace WebApp.Controllers var SEToken = SETokenUtil.GetToken(this.Request); - if (!string.IsNullOrEmpty(SubCategoryIDs)) { - rsSubCategoryIDs = JsonConvert.DeserializeObject>(SubCategoryIDs); - } - - if (!string.IsNullOrEmpty(BookingStatuses)) - { - rsBookingStatuses = JsonConvert.DeserializeObject>(BookingStatuses); - } - - if (!string.IsNullOrEmpty(PaymentStatuses)) - { - rsPaymentStatuses = JsonConvert.DeserializeObject>(PaymentStatuses); - } - - return new BookingService().GetBookings(SEToken.Account, Lang, rsSubCategoryIDs, rsBookingStatuses, rsPaymentStatuses); - } - - /// - /// - /// - /// - /// - [HttpGet] - public HttpResponseMessage TestBookings( - string Account, - string Lang, - string SubCategoryIDs, - string BookingStatuses, - string PaymentStatuses) - { - - List rsSubCategoryIDs = new List(); - List rsBookingStatuses = new List(); - List rsPaymentStatuses = new List(); - if (!string.IsNullOrEmpty(SubCategoryIDs)) { rsSubCategoryIDs = JsonConvert.DeserializeObject>(SubCategoryIDs); @@ -119,9 +84,8 @@ namespace WebApp.Controllers rsPaymentStatuses = JsonConvert.DeserializeObject>(PaymentStatuses); } - return new BookingService().GetBookings(Account, Lang, rsSubCategoryIDs, rsBookingStatuses, rsPaymentStatuses); + return new BookingService().GetBookings(SEToken.Account, Lang, rsSubCategoryIDs, rsBookingStatuses, rsPaymentStatuses); } - } }