Skip to content

Commit

Permalink
Refactor WebApiEndpoint to use TResponse instead of TViewModel
Browse files Browse the repository at this point in the history
  • Loading branch information
ricksu978 committed Jan 19, 2024
1 parent 5620947 commit 3fd4cda
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/BackEnd/src/Presentation/WebApi/Common/WebApiEndpoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
using Wsa.Gaas.Werewolf.Application.Common;

namespace Wsa.Gaas.Werewolf.WebApi.Common;
public abstract class WebApiEndpoint<TRequest, TViewModel> : Endpoint<TRequest, TViewModel>
public abstract class WebApiEndpoint<TRequest, TResponse> : Endpoint<TRequest, TResponse>
where TRequest : notnull, new()
where TViewModel : notnull
where TResponse : notnull
{
public required UseCase<TRequest, TViewModel> UseCase { get; set; }
public required UseCase<TRequest, TResponse> UseCase { get; set; }

public abstract override Task<TViewModel> ExecuteAsync(TRequest req, CancellationToken ct);
public abstract override Task<TResponse> ExecuteAsync(TRequest req, CancellationToken ct);

}

0 comments on commit 3fd4cda

Please sign in to comment.