Skip to content

Commit

Permalink
#58 do not send "title" along in command "deleteStory"
Browse files Browse the repository at this point in the history
  • Loading branch information
xeronimus@gmail.com authored and xeronimus@gmail.com committed Jun 15, 2020
1 parent b3abf32 commit a87161a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions client/app/actions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,15 +269,14 @@ export const changeStory = (storyId, title, description) => (dispatch, getState)
);
};

export const deleteStory = (storyId, title) => (dispatch, getState) => {
export const deleteStory = (storyId) => (dispatch, getState) => {
const state = getState();
hub.sendCommand(
{
name: 'deleteStory',
roomId: state.roomId,
payload: {
storyId,
title
storyId
}
},
dispatch
Expand Down
2 changes: 1 addition & 1 deletion client/app/components/Story.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const Story = ({

function triggerDelete(e) {
e.stopPropagation(); // make sure to stop bubbling up. we do not want to trigger story select
deleteStory(story.id, story.title);
deleteStory(story.id);
}
};

Expand Down

0 comments on commit a87161a

Please sign in to comment.