fix
This commit is contained in:
@@ -2,4 +2,4 @@ using AipsCore.Application.Abstract.Command;
|
||||
|
||||
namespace AipsCore.Application.Models.Whiteboard.Command.BanUserFromWhiteboard;
|
||||
|
||||
public record BanUserFromWhiteboardCommand(string CallerId, string UserId, string WhiteboardId) : ICommand;
|
||||
public record BanUserFromWhiteboardCommand(string UserId, string WhiteboardId) : ICommand;
|
||||
@@ -9,10 +9,10 @@ public static class BanUserFromWhiteboardCommandErrors
|
||||
public static ValidationError WhiteboardMembershipNotFound(WhiteboardId whiteboardId, UserId userId)
|
||||
=> new ValidationError(
|
||||
Code: "whiteboard_membership_not_found",
|
||||
Message: $"User with id '{userId}' is not a member of whiteboard with id '{whiteboardId}'");
|
||||
Message: $"User with id '{userId.IdValue}' is not a member of whiteboard with id '{whiteboardId.IdValue}'");
|
||||
|
||||
public static ValidationError WhiteboardNotFound(WhiteboardId whiteboardId)
|
||||
=> new ValidationError(
|
||||
Code: "whiteboard_not_found",
|
||||
Message: $"Whiteboard with id '{whiteboardId}' not found.");
|
||||
Message: $"Whiteboard with id '{whiteboardId.IdValue}' not found.");
|
||||
}
|
||||
@@ -22,9 +22,4 @@ public record DomainId : AbstractValueObject
|
||||
new MinLengthRule(IdValue, 5)
|
||||
];
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return IdValue;
|
||||
}
|
||||
}
|
||||
@@ -57,8 +57,8 @@ public class WhiteboardMembershipRepository
|
||||
{
|
||||
var whiteboardMembership = await Context.WhiteboardMemberships
|
||||
.FirstOrDefaultAsync((entity) =>
|
||||
entity.WhiteboardId.ToString() == whiteboardId.ToString() &&
|
||||
entity.UserId.ToString() == userId.ToString(),
|
||||
entity.WhiteboardId.ToString() == whiteboardId.IdValue &&
|
||||
entity.UserId.ToString() == userId.IdValue,
|
||||
cancellationToken);
|
||||
|
||||
if (whiteboardMembership is null) return null;
|
||||
|
||||
@@ -7,7 +7,7 @@ public class UserContext : IUserContext
|
||||
{
|
||||
public UserId GetCurrentUserId()
|
||||
{
|
||||
return new UserId(new Guid("156b58b0-d0f1-4498-b2b6-afa536b68b1a").ToString());
|
||||
return new UserId(new Guid("52a1810c-802f-48b0-a74c-7b517807e392").ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user