Changes
Build and Push Docker Images / build (push) Failing after 28s

This commit is contained in:
2026-05-06 17:45:05 +03:00
parent 64b0219038
commit b154fe51c3
15 changed files with 50 additions and 110 deletions
+4 -16
View File
@@ -70,8 +70,8 @@ public sealed class CvMatcherController : ControllerBase
var stream = cv.OpenReadStream();
var part = new Refit.StreamPart(stream, cv.FileName, "application/pdf");
using var response = await _cvApi.Upload(part, gdprConsent);
return await ProxyResponseAsync(response, ct);
var res = await _cvApi.Upload(part, gdprConsent);
return Ok(res);
}
catch (OperationCanceledException) when (ct.IsCancellationRequested)
{
@@ -114,9 +114,8 @@ public sealed class CvMatcherController : ControllerBase
request.CvDocumentId,
!string.IsNullOrWhiteSpace(request.JobUrl),
!string.IsNullOrWhiteSpace(request.JobDescription));
using var response = await _cvApi.MatchJob(request);
return await ProxyResponseAsync(response, ct);
var res = await _cvApi.MatchJob(request);
return Ok(res);
}
catch (OperationCanceledException) when (ct.IsCancellationRequested)
{
@@ -129,15 +128,4 @@ public sealed class CvMatcherController : ControllerBase
return StatusCode(StatusCodes.Status502BadGateway, new { error = "CV matcher API request failed." });
}
}
private static async Task<ContentResult> ProxyResponseAsync(HttpResponseMessage response, CancellationToken ct)
{
var body = await response.Content.ReadAsStringAsync(ct);
return new ContentResult
{
StatusCode = (int)response.StatusCode,
Content = body,
ContentType = response.Content.Headers.ContentType?.ToString() ?? "application/json"
};
}
}