From af454c22aa3ec1f9bbcc935f698292093554bb4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miskolczi=20Rich=C3=A1rd?= Date: Wed, 13 Dec 2023 23:58:34 +0100 Subject: [PATCH] Fixed Get parameter --- WD7UVN_HFT_2023241.Client/RestService.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/WD7UVN_HFT_2023241.Client/RestService.cs b/WD7UVN_HFT_2023241.Client/RestService.cs index 3221166..32725a6 100644 --- a/WD7UVN_HFT_2023241.Client/RestService.cs +++ b/WD7UVN_HFT_2023241.Client/RestService.cs @@ -158,7 +158,7 @@ namespace WD7UVN_HFT_2023241.Client public static IQueryable WhoWorksInMaintainerTeam(int id) { IQueryable item = default(IQueryable); - HttpResponseMessage response = client.GetAsync("/api/WhoWorksInMaintainerTeam/" + id.ToString()).GetAwaiter().GetResult(); + HttpResponseMessage response = client.GetAsync("/api/WhoWorksInMaintainerTeam?id=" + id.ToString()).GetAwaiter().GetResult(); if (response.IsSuccessStatusCode) { item = response.Content.ReadAsAsync>().GetAwaiter().GetResult(); @@ -174,7 +174,7 @@ namespace WD7UVN_HFT_2023241.Client public static IQueryable GetSubordinates(int id) { IQueryable item = default(IQueryable); - HttpResponseMessage response = client.GetAsync("/api/GetSubordinates/" + id.ToString()).GetAwaiter().GetResult(); + HttpResponseMessage response = client.GetAsync("/api/GetSubordinates?id=" + id.ToString()).GetAwaiter().GetResult(); if (response.IsSuccessStatusCode) { item = response.Content.ReadAsAsync>().GetAwaiter().GetResult(); @@ -190,7 +190,7 @@ namespace WD7UVN_HFT_2023241.Client public static IQueryable WhoUsesService(int id) { IQueryable item = default(IQueryable); - HttpResponseMessage response = client.GetAsync("/api/WhoUsesService/" + id.ToString()).GetAwaiter().GetResult(); + HttpResponseMessage response = client.GetAsync("/api/WhoUsesService?id=" + id.ToString()).GetAwaiter().GetResult(); if (response.IsSuccessStatusCode) { item = response.Content.ReadAsAsync>().GetAwaiter().GetResult(); @@ -206,7 +206,7 @@ namespace WD7UVN_HFT_2023241.Client public static Employee WhoIsResponsibleForService(int id) { Employee item = default(Employee); - HttpResponseMessage response = client.GetAsync("/api/WhoIsResponsibleForService/" + id.ToString()).GetAwaiter().GetResult(); + HttpResponseMessage response = client.GetAsync("/api/WhoIsResponsibleForService?id=" + id.ToString()).GetAwaiter().GetResult(); if (response.IsSuccessStatusCode) { item = response.Content.ReadAsAsync().GetAwaiter().GetResult(); @@ -222,7 +222,7 @@ namespace WD7UVN_HFT_2023241.Client public static IQueryable WhoMaintainsService(int id) { IQueryable item = default(IQueryable); - HttpResponseMessage response = client.GetAsync("/api/WhoMaintainsService/" + id.ToString()).GetAwaiter().GetResult(); + HttpResponseMessage response = client.GetAsync("/api/WhoMaintainsService?id=" + id.ToString()).GetAwaiter().GetResult(); if (response.IsSuccessStatusCode) { item = response.Content.ReadAsAsync>().GetAwaiter().GetResult();