From c4412d5de6e2b46655b17ba250f1c6a9801f2a04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miskolczi=20Rich=C3=A1rd?= Date: Wed, 3 Apr 2024 12:58:49 +0200 Subject: [PATCH] fixed endpoint addresses --- WD7UVN_SzTGUI_2023242.Client.WPF/RestCollection.cs | 2 +- .../ViewModels/MainWindowViewModel.cs | 8 ++++---- .../Windows/GetAllServices.xaml.cs | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/WD7UVN_SzTGUI_2023242.Client.WPF/RestCollection.cs b/WD7UVN_SzTGUI_2023242.Client.WPF/RestCollection.cs index 14095da..9c08784 100644 --- a/WD7UVN_SzTGUI_2023242.Client.WPF/RestCollection.cs +++ b/WD7UVN_SzTGUI_2023242.Client.WPF/RestCollection.cs @@ -322,7 +322,7 @@ namespace WD7UVN_SzTGUI_2023242.Client.WPF private async Task Init() { - items = await rest.GetAsync(typeof(T).Name); + items = await rest.GetAsync("api/" + typeof(T).Name); CollectionChanged?.Invoke(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset)); } diff --git a/WD7UVN_SzTGUI_2023242.Client.WPF/ViewModels/MainWindowViewModel.cs b/WD7UVN_SzTGUI_2023242.Client.WPF/ViewModels/MainWindowViewModel.cs index a3ed79f..e9a5644 100644 --- a/WD7UVN_SzTGUI_2023242.Client.WPF/ViewModels/MainWindowViewModel.cs +++ b/WD7UVN_SzTGUI_2023242.Client.WPF/ViewModels/MainWindowViewModel.cs @@ -33,10 +33,10 @@ namespace WD7UVN_SzTGUI_2023242.Client.WPF.ViewModels { if (!IsInDesignMode) { - Services = new RestCollection("http://localhost:62005/", "Service", "hub"); - Employees = new RestCollection("http://localhost:62005/", "Employee", "hub"); - MaintainerTeams = new RestCollection("http://localhost:62005/", "MaintainerTeam", "hub"); - Customers = new RestCollection("http://localhost:62005/", "Customer", "hub"); + Services = new RestCollection("http://localhost:5000/", "api/Service"); + Employees = new RestCollection("http://localhost:5000/", "api/Employee"); + MaintainerTeams = new RestCollection("http://localhost:5000/", "api/MaintainerTeam"); + Customers = new RestCollection("http://localhost:5000/", "api/Customer"); } } } diff --git a/WD7UVN_SzTGUI_2023242.Client.WPF/Windows/GetAllServices.xaml.cs b/WD7UVN_SzTGUI_2023242.Client.WPF/Windows/GetAllServices.xaml.cs index 7fbaaa1..0d9b65d 100644 --- a/WD7UVN_SzTGUI_2023242.Client.WPF/Windows/GetAllServices.xaml.cs +++ b/WD7UVN_SzTGUI_2023242.Client.WPF/Windows/GetAllServices.xaml.cs @@ -14,7 +14,7 @@ namespace WD7UVN_SzTGUI_2023242.Client.WPF { InitializeComponent(); - Services = new RestCollection("https://localhost:5001", "Service", "hub"); + Services = new RestCollection("http://localhost:5000/", "api/Service"); } } }