Implement US-03 patient profile updates

This commit is contained in:
Steffen committed 2026-10-01 11:29:54 +02:00
1 parent eb2cf2e54a
commit a9633e49e1
8 files changed
+123 -5

No files matched your search

@@ -14,10 +14,14 @@ public sealed class PatientController(IHttpClientFactory clients) : ControllerBa
public Task GetPatient(Guid patientId, CancellationToken cancellationToken) =>
ForwardAsync(HttpMethod.Get, $"api/patients/{patientId}", cancellationToken);
[HttpPut("{patientId:guid}")]
public Task UpdatePatient(Guid patientId, CancellationToken cancellationToken) =>
ForwardAsync(HttpMethod.Put, $"api/patients/{patientId}", cancellationToken);
private async Task ForwardAsync(HttpMethod method, string path, CancellationToken cancellationToken)
{
using var request = new HttpRequestMessage(method, path);
if (method == HttpMethod.Post)
if (method == HttpMethod.Post || method == HttpMethod.Put)
{
request.Content = new StreamContent(Request.Body);
if (Request.ContentType is not null)