Y2S2-Syski/syski_api/uk.co.syski.websocket/Services/WebSockets/Actions/Handlers/DefaultHandler.cs
2020-06-09 21:02:14 +01:00

24 lines
641 B
C#

using Newtonsoft.Json.Linq;
using System;
namespace Syski.WebSocket.Services.WebSockets.Actions.Handlers
{
public class DefaultHandler : ActionHandler
{
public DefaultHandler(Action action, WebSocketConnection webSocket, IServiceProvider serviceProvider) : base(action, webSocket, serviceProvider)
{
}
public override async void HandleAction()
{
JObject properties = new JObject
{
{ "message", "Invalid Action Sent (" + action.action + ")" }
};
await webSocketConnection.SendAction("error", properties);
}
}
}