Skip to content

Commit

Permalink
dispatcher adjustment
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaskabc authored and ledsoft committed Sep 3, 2024
1 parent 269f10e commit 48c4a6b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/reducer/WebSocketDispatchers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ function d<A extends Action>(
action: A,
onMessage: WebSocketDispatcherCallback<A>,
headers?: StompHeaders
): WebSocketDispatcher<A> {
return { destinations, action, onMessage, headers };
): { [key in ActionType]?: WebSocketDispatcher<A> } {
return { [action.type]: { destinations, action, onMessage, headers } };
}

const DISPATCHERS: { [key in ActionType]?: WebSocketDispatcher<any> } = {
[ActionType.FETCH_VALIDATION_RESULTS]: d(
...d(
"/vocabularies/validation",
{
type: ActionType.FETCH_VALIDATION_RESULTS,
Expand Down

0 comments on commit 48c4a6b

Please sign in to comment.