session
This commit is contained in:
parent
baea64229b
commit
0dc41337da
36 changed files with 324 additions and 95 deletions
|
@ -1,18 +0,0 @@
|
|||
using Femto.Common.Domain;
|
||||
using Femto.Modules.Authentication.Data;
|
||||
using MediatR;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
|
||||
namespace Femto.Modules.Authentication.Application;
|
||||
|
||||
internal class AuthenticationModule(IHost host) : IAuthenticationModule
|
||||
{
|
||||
public async Task<TResponse> PostCommand<TResponse>(ICommand<TResponse> command, CancellationToken cancellationToken = default)
|
||||
{
|
||||
using var scope = host.Services.CreateScope();
|
||||
var mediator = scope.ServiceProvider.GetRequiredService<IMediator>();
|
||||
var response = await mediator.Send(command, cancellationToken);
|
||||
return response;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue