Skip to content

Commit

Permalink
Remove unused onPublish
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeBild committed Dec 25, 2017
1 parent 9aa2fa4 commit a8a228b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "subscriptions-transport-sse",
"version": "0.8.0",
"version": "0.8.1",
"author": "Mike Bild <mike.bild@googlemail.com>",
"license": "MIT",
"homepage": "https://github.com/mikebild/subscriptions-transport-sse#readme",
Expand Down
4 changes: 1 addition & 3 deletions src/express.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export function SubscriptionServer(subscriptionOptions, connectionOptions) {
onUnsubscribe,
onConnect,
onDisconnect,
onPublish,
keepAlive
} = subscriptionOptions;
if (!subscriptionManager)
Expand Down Expand Up @@ -99,8 +98,7 @@ export function SubscriptionServer(subscriptionOptions, connectionOptions) {
`${connectionOptions.path}/publish/:topic?`,
(req, res) => {
const topic = req.params.topic || 'event-web-publish';
const onPublishData = onPublish && onPublish(req);
const data = onPublishData || req.body || {};
const data = req.body || {};
subscriptionOptions.subscriptionManager.pubsub.publish(topic, data);
res.setHeader('Content-Type', 'application/json');
res.sendStatus(202);
Expand Down

0 comments on commit a8a228b

Please sign in to comment.