MainPage => BlogsPage

This commit is contained in:
Paul Schneider 2026-09-11 16:22:49 +01:00
commit 344c38704b
Signed by: notazof
GPG key ID: 1DD5D838E5343B06
6 changed files with 11 additions and 6 deletions

View file

@ -91,7 +91,7 @@ public sealed class BlogApiClient
=> _api.CallAsync(HttpMethod.Put, $"{_pathPrefix}/{id}/publish",
body: new { publish }, ct: ct);
private Task<BlogPostDto?> SendPostAsync(
private async Task<BlogPostDto?> SendPostAsync(
HttpMethod method,
string path,
BlogPostDto post,
@ -99,9 +99,9 @@ public sealed class BlogApiClient
CancellationToken ct)
{
if (files is null || files.Count == 0)
return _api.CallAsync<BlogPostDto?>(method, path, body: post, ct: ct);
return await _api.CallAsync<BlogPostDto?>(method, path, body: post, ct: ct);
return _api.CallAsync<BlogPostDto?>(method, path, () => CreateMultipartContent(post, files), ct: ct);
return await _api.CallAsync<BlogPostDto?>(method, path, () => CreateMultipartContent(post, files), ct: ct);
}
private static HttpContent CreateMultipartContent(BlogPostDto post, IReadOnlyCollection<BlogUploadFile> files)