Test temp fix for cond
This commit is contained in:
parent
dbc776ddda
commit
7edcd07723
14
Application/Game/Card/Write/WriteCondCommand.cs
Normal file
14
Application/Game/Card/Write/WriteCondCommand.cs
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
namespace Application.Game.Card.Write;
|
||||||
|
|
||||||
|
public record WriteCondCommand(long CardId, string Data) : IRequestWrapper<string>;
|
||||||
|
|
||||||
|
public class WriteCondCommandHandler : RequestHandlerBase<WriteCondCommand, string>
|
||||||
|
{
|
||||||
|
public WriteCondCommandHandler(ICardDependencyAggregate aggregate) : base(aggregate) {}
|
||||||
|
|
||||||
|
public override Task<ServiceResult<string>> Handle(WriteCondCommand request, CancellationToken cancellationToken)
|
||||||
|
{
|
||||||
|
// TODO: Add proper implementation
|
||||||
|
return Task.FromResult(new ServiceResult<string>(request.Data));
|
||||||
|
}
|
||||||
|
}
|
@ -53,6 +53,7 @@ public enum CardRequestType
|
|||||||
WriteCoin = 980,
|
WriteCoin = 980,
|
||||||
WriteUnlockKeynum = 1020,
|
WriteUnlockKeynum = 1020,
|
||||||
WriteSoundEffect = 8969,
|
WriteSoundEffect = 8969,
|
||||||
|
WriteCond = 8976,
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ public class CardController : BaseController<CardController>
|
|||||||
cardCommandType.Throw().IfOutOfRange();
|
cardCommandType.Throw().IfOutOfRange();
|
||||||
if (cardCommandType is CardCommandType.CardReadRequest or CardCommandType.CardWriteRequest)
|
if (cardCommandType is CardCommandType.CardReadRequest or CardCommandType.CardWriteRequest)
|
||||||
{
|
{
|
||||||
cardRequestType.Throw().IfOutOfRange();
|
cardRequestType.Throw($"Failed to process {cardCommandType.ToString()}").IfOutOfRange();
|
||||||
}
|
}
|
||||||
|
|
||||||
request.Data = WebUtility.UrlDecode(request.Data);
|
request.Data = WebUtility.UrlDecode(request.Data);
|
||||||
@ -84,6 +84,8 @@ public class CardController : BaseController<CardController>
|
|||||||
new WriteUnlockKeynumCommand(request.CardId, request.Data)),
|
new WriteUnlockKeynumCommand(request.CardId, request.Data)),
|
||||||
CardRequestType.WriteSoundEffect => await Mediator.Send(
|
CardRequestType.WriteSoundEffect => await Mediator.Send(
|
||||||
new WriteSoundEffectCommand(request.CardId, request.Data)),
|
new WriteSoundEffectCommand(request.CardId, request.Data)),
|
||||||
|
CardRequestType.WriteCond => await Mediator.Send(
|
||||||
|
new WriteCondCommand(request.CardId, request.Data)),
|
||||||
CardRequestType.StartOnlineMatching => await Mediator.Send(
|
CardRequestType.StartOnlineMatching => await Mediator.Send(
|
||||||
new StartOnlineMatchingCommand(request.CardId, request.Data)),
|
new StartOnlineMatchingCommand(request.CardId, request.Data)),
|
||||||
CardRequestType.UpdateOnlineMatching => await Mediator.Send(
|
CardRequestType.UpdateOnlineMatching => await Mediator.Send(
|
||||||
|
Loading…
Reference in New Issue
Block a user