summaryrefslogtreecommitdiff
path: root/src/queue/processors/http
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-04-07 13:03:19 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-04-07 13:03:19 +0900
commitddced43ec7251fccaf915028df5d3b25399a4499 (patch)
tree8cd96373981f523967926b6014c640e2b48c00d3 /src/queue/processors/http
parentIgnore post that not public (diff)
parentMerge pull request #1410 from akihikodaki/objec (diff)
downloadsharkey-ddced43ec7251fccaf915028df5d3b25399a4499.tar.gz
sharkey-ddced43ec7251fccaf915028df5d3b25399a4499.tar.bz2
sharkey-ddced43ec7251fccaf915028df5d3b25399a4499.zip
Merge branch 'master' into refactor
Diffstat (limited to 'src/queue/processors/http')
-rw-r--r--src/queue/processors/http/index.ts25
1 files changed, 11 insertions, 14 deletions
diff --git a/src/queue/processors/http/index.ts b/src/queue/processors/http/index.ts
index 3dc2595374..0ea79305c6 100644
--- a/src/queue/processors/http/index.ts
+++ b/src/queue/processors/http/index.ts
@@ -1,20 +1,17 @@
-import deliver from './deliver';
+import deliverPost from './deliver-post';
+import follow from './follow';
+import performActivityPub from './perform-activitypub';
import processInbox from './process-inbox';
import reportGitHubFailure from './report-github-failure';
+import unfollow from './unfollow';
const handlers = {
- deliver,
- processInbox,
- reportGitHubFailure
+ deliverPost,
+ follow,
+ performActivityPub,
+ processInbox,
+ reportGitHubFailure,
+ unfollow
};
-export default (job, done) => {
- const handler = handlers[job.data.type];
-
- if (handler) {
- handler(job, done);
- } else {
- console.error(`Unknown job: ${job.data.type}`);
- done();
- }
-};
+export default (job, done) => handlers[job.data.type](job, done);