Y2S2-Syski/syski_api/uk.co.syski.websocket/Services/WebSockets/Actions/Handlers/DefaultHandler.cs

24 lines
641 B
C#
Raw Permalink Normal View History

2020-06-09 20:02:14 +00:00
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);
}
}
}