Merge branch 'Feature/program-manager/move' of https://github.com/samsyntax24/OriginalGozareshgir into Feature/program-manager/move
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
using GozareshgirProgramManager.Application.Modules.Users.Queries.GetSingleUser;
|
||||
using MediatR;
|
||||
using Shared.Contracts.PmUser;
|
||||
|
||||
namespace GozareshgirProgramManager.Infrastructure.Services.User;
|
||||
|
||||
public class PmUserQueryService : IPmUserQueryService
|
||||
{
|
||||
public readonly IMediator _mediator;
|
||||
|
||||
public PmUserQueryService(IMediator mediator)
|
||||
{
|
||||
_mediator = mediator;
|
||||
}
|
||||
|
||||
public async Task<long?> GetCurrentPmUserIdFromAccountId(long accountId)
|
||||
{
|
||||
var query = new GetSingleUserQuery(accountId.ToString());
|
||||
var result = await _mediator.Send(query);
|
||||
return result.Data?.AccountId ?? null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user