feat: WIP connections query endpoint
This commit is contained in:
@@ -17,7 +17,7 @@ public class GetConnectionsEndpoint(PuzzleRepository _puzzleRepo) : Endpoint<Get
|
||||
bool hideSolutions = Query<bool>("hideSolutions", isRequired: false);
|
||||
|
||||
// query for the puzzle
|
||||
var puzzle = await _puzzleRepo.GetPuzzleByDateAsync(req.PrintDate, includeSolutions: !hideSolutions);
|
||||
var puzzle = await _puzzleRepo.GetConnectionsByDateAsync(req.PrintDate, includeSolutions: !hideSolutions);
|
||||
|
||||
// if not found, done here
|
||||
if (puzzle == null)
|
||||
|
||||
17
Features/Connections/Query/Endpoint.cs
Normal file
17
Features/Connections/Query/Endpoint.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using ConnectionsAPI.Models.Request;
|
||||
using ConnectionsAPI.Models.Response;
|
||||
|
||||
namespace ConnectionsAPI.Features.Connections.Query;
|
||||
|
||||
public class Endpoint : Endpoint<QueryPuzzlesRequest, PagedDataResponse<ConnectionsPuzzleDTO>>
|
||||
{
|
||||
public override void Configure()
|
||||
{
|
||||
Get("query");
|
||||
}
|
||||
|
||||
public override Task HandleAsync(QueryPuzzlesRequest req, CancellationToken ct)
|
||||
{
|
||||
return base.HandleAsync(req, ct);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user