PromucFlow_constructor/app/client/src/constants/WebsocketConstants.tsx
Arpit Mohan c078976616
chore: Minor refactoring changes for RTS (#7011)
* Checking for anonymousUser when performing session check

* Using the custom path /rts instead of the default /socket.io. This makes the endpoint more readable & scalable for future websocket endpoints as well.
2021-09-02 08:47:42 +05:30

20 lines
432 B
TypeScript

export const WEBSOCKET_EVENTS = {
RECONNECT: "RECONNECT",
DISCONNECTED: "DISCONNECTED",
CONNECTED: "CONNECTED",
};
export const reconnectWebsocketEvent = () => ({
type: WEBSOCKET_EVENTS.RECONNECT,
});
export const websocketDisconnectedEvent = () => ({
type: WEBSOCKET_EVENTS.DISCONNECTED,
});
export const websocketConnectedEvent = () => ({
type: WEBSOCKET_EVENTS.CONNECTED,
});
export const RTS_BASE_PATH = "/rts";