refactor(GetRequest): aktualisiert, um von Request zu erben
- Hinzufügen der apiVersion-Eingabe zur IsAlive-Methode von MediatRExtensions
This commit is contained in:
parent
3b9b9f19b2
commit
67b2456032
@ -1,8 +1,9 @@
|
||||
using MediatR;
|
||||
using Leanetec.EConnect.Client.Models;
|
||||
using MediatR;
|
||||
|
||||
namespace Leanetec.EConnect.Client.Alive;
|
||||
|
||||
public record GetRequest(Role? Role = null) : IRequest<bool>
|
||||
public record GetRequest(Role? Role = null) : Request<bool>, IRequest<bool>
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@ -10,8 +10,11 @@ public static class MediatRExtensions
|
||||
/// <param name="mediator"></param>
|
||||
/// <param name="role">Role of logged user</param>
|
||||
/// <returns></returns>
|
||||
public static Task<bool> IsAliveAsync(this IMediator mediator, Role? role = null)
|
||||
public static Task<bool> IsAliveAsync(this IMediator mediator, Role? role = null, int? apiVersion = null)
|
||||
{
|
||||
return mediator.Send(new GetRequest(role));
|
||||
return mediator.Send(new GetRequest(role)
|
||||
{
|
||||
ApiVersion = apiVersion
|
||||
});
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user