mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-23 20:49:06 +01:00
oops
This commit is contained in:
parent
5a7e706cab
commit
eaffa118b4
@ -1,17 +1,20 @@
|
|||||||
import deliverPost from './deliver-post';
|
import deliver from './deliver';
|
||||||
import follow from './follow';
|
|
||||||
import performActivityPub from './perform-activitypub';
|
|
||||||
import processInbox from './process-inbox';
|
import processInbox from './process-inbox';
|
||||||
import reportGitHubFailure from './report-github-failure';
|
import reportGitHubFailure from './report-github-failure';
|
||||||
import unfollow from './unfollow';
|
|
||||||
|
|
||||||
const handlers = {
|
const handlers = {
|
||||||
deliverPost,
|
deliver,
|
||||||
follow,
|
processInbox,
|
||||||
performActivityPub,
|
reportGitHubFailure
|
||||||
processInbox,
|
|
||||||
reportGitHubFailure,
|
|
||||||
unfollow
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default (job, done) => handlers[job.data.type](job, done);
|
export default (job, done) => {
|
||||||
|
const handler = handlers[job.data.type];
|
||||||
|
|
||||||
|
if (handler) {
|
||||||
|
handler(job, done);
|
||||||
|
} else {
|
||||||
|
console.error(`Unknown job: ${job.data.type}`);
|
||||||
|
done();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user