diff options
author | Darius Kazemi <darius.kazemi@gmail.com> | 2020-01-06 23:29:24 -0800 |
---|---|---|
committer | Darius Kazemi <darius.kazemi@gmail.com> | 2020-01-06 23:29:24 -0800 |
commit | 5ffe6115740cfa293322e1961e7c9996e32ce2a4 (patch) | |
tree | baae6484940c790bf560b32ee0cd4daa997502a5 /routes.js | |
parent | f5178f1a663c721c910b793a2dfd5b2cc6ce9e76 (diff) |
move function to activitypub file
Diffstat (limited to 'routes.js')
-rwxr-xr-x | routes.js | 20 |
1 files changed, 1 insertions, 19 deletions
@@ -132,24 +132,6 @@ const deleteOldEvents = schedule.scheduleJob('59 23 * * *', function(fireDate){ }); }); - -// ACTIVITYPUB HELPER FUNCTIONS -function createWebfinger(eventID, domain) { - return { - 'subject': `acct:${eventID}@${domain}`, - - 'links': [ - { - 'rel': 'self', - 'type': 'application/activity+json', - 'href': `https://${domain}/${eventID}` - } - ] - }; -} - - - // FRONTEND ROUTES router.get('/', (req, res) => { @@ -278,7 +260,7 @@ router.get('/.well-known/webfinger', (req, res) => { res.render('404', { url: req.url }); } else { - res.json(createWebfinger(eventID, domain)); + res.json(ap.createWebfinger(eventID, domain)); } }) .catch((err) => { |