From b1834c3417ac610aa01e4071d69a792ffb2a0411 Mon Sep 17 00:00:00 2001 From: Developer 02 Date: Fri, 13 Sep 2024 11:27:27 +0200 Subject: [PATCH] refactor: DocCreateBody in DocBody umbenannt - `DocCreateBody` in `DocBody` umbenannt, um den Code einfacher und klarer zu gestalten. --- .../Models/Documents/Request/{DocCreateBody.cs => DocBody.cs} | 2 +- src/WindreamHub.Legacy.Client/Routes/DocumentsRouteService.cs | 2 +- src/WindreamHub.Legacy.Client/WindreamHub.Legacy.Client.csproj | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename src/WindreamHub.Legacy.Client/Models/Documents/Request/{DocCreateBody.cs => DocBody.cs} (87%) diff --git a/src/WindreamHub.Legacy.Client/Models/Documents/Request/DocCreateBody.cs b/src/WindreamHub.Legacy.Client/Models/Documents/Request/DocBody.cs similarity index 87% rename from src/WindreamHub.Legacy.Client/Models/Documents/Request/DocCreateBody.cs rename to src/WindreamHub.Legacy.Client/Models/Documents/Request/DocBody.cs index bdfa6d3..8d37f31 100644 --- a/src/WindreamHub.Legacy.Client/Models/Documents/Request/DocCreateBody.cs +++ b/src/WindreamHub.Legacy.Client/Models/Documents/Request/DocBody.cs @@ -1,6 +1,6 @@ namespace WindreamHub.Legacy.Client.Models.Documents.Request { - public class DocCreateBody + public class DocBody { public Item Item { get; set; } public bool? CreateFolder { get; set; } diff --git a/src/WindreamHub.Legacy.Client/Routes/DocumentsRouteService.cs b/src/WindreamHub.Legacy.Client/Routes/DocumentsRouteService.cs index 471b5d4..1d30bd9 100644 --- a/src/WindreamHub.Legacy.Client/Routes/DocumentsRouteService.cs +++ b/src/WindreamHub.Legacy.Client/Routes/DocumentsRouteService.cs @@ -23,7 +23,7 @@ namespace WindreamHub.Legacy.Client.Routes => await FetchAsync(route: "/Create", method: HttpMethod.Post, body: docCreateBody) .ThenAsync(res => res.Simplify()); - public async Task> Create(DocCreateBody docCreateBody) + public async Task> Create(DocBody docCreateBody) => await FetchAsync(route: "/Create", method: HttpMethod.Post, body: docCreateBody.Stringify()) .ThenAsync(res => res.Simplify()); diff --git a/src/WindreamHub.Legacy.Client/WindreamHub.Legacy.Client.csproj b/src/WindreamHub.Legacy.Client/WindreamHub.Legacy.Client.csproj index 539a51e..eda8b2d 100644 --- a/src/WindreamHub.Legacy.Client/WindreamHub.Legacy.Client.csproj +++ b/src/WindreamHub.Legacy.Client/WindreamHub.Legacy.Client.csproj @@ -94,7 +94,7 @@ - +