fix: TaxFilingBrowserClient의 API 라우트 경로 오타 및 prefix 누락 오류 수정 (tax-filing -> api/taxfiling)
TaxBaik CI/CD / build-and-deploy (push) Successful in 57s
TaxBaik CI/CD / build-and-deploy (push) Successful in 57s
This commit is contained in:
@@ -229,8 +229,7 @@ builder.Services.AddHttpClient<IClientBrowserClient, ClientBrowserClient>(client
|
|||||||
builder.Services.AddHttpClient<ITaxFilingBrowserClient, TaxFilingBrowserClient>(client =>
|
builder.Services.AddHttpClient<ITaxFilingBrowserClient, TaxFilingBrowserClient>(client =>
|
||||||
{
|
{
|
||||||
client.BaseAddress = new Uri(apiBaseUrl);
|
client.BaseAddress = new Uri(apiBaseUrl);
|
||||||
})
|
});
|
||||||
.AddHttpMessageHandler<TokenRefreshHandler>();
|
|
||||||
builder.Services.AddHttpClient<IFaqBrowserClient, FaqBrowserClient>(client =>
|
builder.Services.AddHttpClient<IFaqBrowserClient, FaqBrowserClient>(client =>
|
||||||
{
|
{
|
||||||
client.BaseAddress = new Uri(apiBaseUrl);
|
client.BaseAddress = new Uri(apiBaseUrl);
|
||||||
|
|||||||
@@ -32,10 +32,10 @@ public class TaxFilingBrowserClient : ITaxFilingBrowserClient
|
|||||||
|
|
||||||
private void EnsureAuthHeader()
|
private void EnsureAuthHeader()
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrEmpty(_tokenStore.AccessToken) && !_http.DefaultRequestHeaders.Contains("Authorization"))
|
if (!string.IsNullOrEmpty(_tokenStore.AccessToken))
|
||||||
{
|
|
||||||
_http.DefaultRequestHeaders.Authorization = new("Bearer", _tokenStore.AccessToken);
|
_http.DefaultRequestHeaders.Authorization = new("Bearer", _tokenStore.AccessToken);
|
||||||
}
|
else
|
||||||
|
_http.DefaultRequestHeaders.Authorization = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<IEnumerable<TaxFiling>> GetUpcomingAsync(int daysAhead = 30, CancellationToken ct = default)
|
public async Task<IEnumerable<TaxFiling>> GetUpcomingAsync(int daysAhead = 30, CancellationToken ct = default)
|
||||||
@@ -44,7 +44,7 @@ public class TaxFilingBrowserClient : ITaxFilingBrowserClient
|
|||||||
{
|
{
|
||||||
EnsureAuthHeader();
|
EnsureAuthHeader();
|
||||||
var result = await _http.GetFromJsonAsync<TaxFilingListResponse>(
|
var result = await _http.GetFromJsonAsync<TaxFilingListResponse>(
|
||||||
$"tax-filing/upcoming?daysAhead={daysAhead}", cancellationToken: ct);
|
$"api/taxfiling/upcoming?daysAhead={daysAhead}", cancellationToken: ct);
|
||||||
return result?.Data ?? [];
|
return result?.Data ?? [];
|
||||||
}
|
}
|
||||||
catch (HttpRequestException ex)
|
catch (HttpRequestException ex)
|
||||||
@@ -60,7 +60,7 @@ public class TaxFilingBrowserClient : ITaxFilingBrowserClient
|
|||||||
{
|
{
|
||||||
EnsureAuthHeader();
|
EnsureAuthHeader();
|
||||||
var result = await _http.GetFromJsonAsync<TaxFilingListResponse>(
|
var result = await _http.GetFromJsonAsync<TaxFilingListResponse>(
|
||||||
$"tax-filing/client/{clientId}", cancellationToken: ct);
|
$"api/taxfiling/client/{clientId}", cancellationToken: ct);
|
||||||
return result?.Data ?? [];
|
return result?.Data ?? [];
|
||||||
}
|
}
|
||||||
catch (HttpRequestException ex)
|
catch (HttpRequestException ex)
|
||||||
@@ -76,7 +76,7 @@ public class TaxFilingBrowserClient : ITaxFilingBrowserClient
|
|||||||
{
|
{
|
||||||
EnsureAuthHeader();
|
EnsureAuthHeader();
|
||||||
return await _http.GetFromJsonAsync<TaxFiling>(
|
return await _http.GetFromJsonAsync<TaxFiling>(
|
||||||
$"tax-filing/{id}", cancellationToken: ct);
|
$"api/taxfiling/{id}", cancellationToken: ct);
|
||||||
}
|
}
|
||||||
catch (HttpRequestException ex)
|
catch (HttpRequestException ex)
|
||||||
{
|
{
|
||||||
@@ -90,7 +90,7 @@ public class TaxFilingBrowserClient : ITaxFilingBrowserClient
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
EnsureAuthHeader();
|
EnsureAuthHeader();
|
||||||
var response = await _http.PostAsJsonAsync("tax-filing", filing, cancellationToken: ct);
|
var response = await _http.PostAsJsonAsync("api/taxfiling", filing, cancellationToken: ct);
|
||||||
if (!response.IsSuccessStatusCode)
|
if (!response.IsSuccessStatusCode)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
@@ -111,7 +111,7 @@ public class TaxFilingBrowserClient : ITaxFilingBrowserClient
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
EnsureAuthHeader();
|
EnsureAuthHeader();
|
||||||
var response = await _http.PutAsJsonAsync($"tax-filing/{id}", filing, cancellationToken: ct);
|
var response = await _http.PutAsJsonAsync($"api/taxfiling/{id}", filing, cancellationToken: ct);
|
||||||
if (!response.IsSuccessStatusCode)
|
if (!response.IsSuccessStatusCode)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
@@ -132,7 +132,7 @@ public class TaxFilingBrowserClient : ITaxFilingBrowserClient
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
EnsureAuthHeader();
|
EnsureAuthHeader();
|
||||||
var response = await _http.DeleteAsync($"tax-filing/{id}", cancellationToken: ct);
|
var response = await _http.DeleteAsync($"api/taxfiling/{id}", cancellationToken: ct);
|
||||||
return response.IsSuccessStatusCode;
|
return response.IsSuccessStatusCode;
|
||||||
}
|
}
|
||||||
catch (HttpRequestException ex)
|
catch (HttpRequestException ex)
|
||||||
|
|||||||
Reference in New Issue
Block a user