From 2e2707844362c95cd048a9eb848da71b616986b8 Mon Sep 17 00:00:00 2001 From: Mario Steele Date: Sat, 19 Jul 2025 12:40:00 -0500 Subject: [PATCH] Updated SearchHistoryEndpoints.cs Fixed wrong Model for SearchHistory, was using Regular History class, instead of SearchHistory class. --- FreeTubeSync/EndPoints/SearchHistoryEndpoint.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/FreeTubeSync/EndPoints/SearchHistoryEndpoint.cs b/FreeTubeSync/EndPoints/SearchHistoryEndpoint.cs index 38519ed..8908ddc 100644 --- a/FreeTubeSync/EndPoints/SearchHistoryEndpoint.cs +++ b/FreeTubeSync/EndPoints/SearchHistoryEndpoint.cs @@ -8,13 +8,13 @@ public static class SearchHistoryEndpoint { var group = app.MapGroup("searchHistory"); - group.MapGet("/", async (IRepository repository, CancellationToken ct) => + group.MapGet("/", async (IRepository repository, CancellationToken ct) => { var result = await repository.GetAllAsync(ct); return Results.Ok(result); }); - group.MapPost("/", async (IRepository repository, CancellationToken ct, History history) => + group.MapPost("/", async (IRepository repository, CancellationToken ct, SearchHistory history) => { var result = await repository.GetByIdAsync(history._id, ct); if (result != null) @@ -24,7 +24,7 @@ public static class SearchHistoryEndpoint return Results.Ok(); }); - group.MapDelete("/{id}", async (IRepository repository, CancellationToken ct, string id) => + group.MapDelete("/{id}", async (IRepository repository, CancellationToken ct, string id) => { var result = await repository.GetByIdAsync(id, ct); if (result == null) return Results.NotFound();