From 4f8f24132c4ab455196c0319357d9a2dcb7dab42 Mon Sep 17 00:00:00 2001 From: Frede Hundewadt Date: Tue, 10 Jan 2023 13:51:14 +0100 Subject: [PATCH] WIP --- Wonky.Client/HttpRepository/CountryCustomerRepository.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Wonky.Client/HttpRepository/CountryCustomerRepository.cs b/Wonky.Client/HttpRepository/CountryCustomerRepository.cs index 5f99aac7..5669600f 100644 --- a/Wonky.Client/HttpRepository/CountryCustomerRepository.cs +++ b/Wonky.Client/HttpRepository/CountryCustomerRepository.cs @@ -108,7 +108,7 @@ public class CountryCustomerRepository : ICountryCustomerRepository ["hasFolded"] = paging.HasFolded.ToString(), }; - var response = await _client.GetAsync(QueryHelpers.AddQueryString($"{_api.OfficeCustomers}/salesRep/{salesRepId}/", queryString)); + var response = await _client.GetAsync(QueryHelpers.AddQueryString($"{_api.OfficeCustomers}/{countryCode}/salesRep/{salesRepId}/", queryString)); var content = await response.Content.ReadAsStringAsync(); var pagingResponse = new PagingResponse { @@ -127,7 +127,7 @@ public class CountryCustomerRepository : ICountryCustomerRepository /// public async Task GetByCustomerId(string countryCode, string companyId) { - var company = await _client.GetFromJsonAsync($"{_api.OfficeCustomers}/id/{companyId}"); + var company = await _client.GetFromJsonAsync($"{_api.OfficeCustomers}/{countryCode}/id/{companyId}"); return company ?? new CompanyDto(); } @@ -140,7 +140,7 @@ public class CountryCustomerRepository : ICountryCustomerRepository /// public async Task UpdateCompany(string countryCode, string companyId, CompanyDto model) { - var response = await _client.PutAsJsonAsync($"{_api.OfficeCustomers}/{companyId}", model); + var response = await _client.PutAsJsonAsync($"{_api.OfficeCustomers}/{countryCode}/{companyId}", model); var content = await response.Content.ReadAsStringAsync(); Console.WriteLine(content); return response.IsSuccessStatusCode;