Canceling join request now actually changes the status to cancelled so trying to join same RequestToJoin whiteboard with code manually doesnt fail due to status being Pending
This commit is contained in:
23
dotnet/AipsRT/Model/Users/UserService.cs
Normal file
23
dotnet/AipsRT/Model/Users/UserService.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using AipsCore.Application.Abstract;
|
||||
using AipsCore.Application.Models.User.Query.GetUser;
|
||||
using AipsCore.Application.Models.Whiteboard.Command.UserCanceledRequestToJoin;
|
||||
|
||||
namespace AipsRT.Model.Users;
|
||||
|
||||
public class UserService
|
||||
{
|
||||
private readonly IDispatcher _dispatcher;
|
||||
|
||||
public UserService(IDispatcher dispatcher)
|
||||
{
|
||||
_dispatcher = dispatcher;
|
||||
}
|
||||
|
||||
public async Task<User> GetUser(Guid userId)
|
||||
{
|
||||
var query = new GetUserQuery(userId.ToString());
|
||||
var userQueryDto = await _dispatcher.Execute(query);
|
||||
|
||||
return new User(Guid.Parse(userQueryDto.Id), userQueryDto.UserName, userQueryDto.Email);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user